54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
---
|
|
# tasks file for radicale
|
|
|
|
- name: Installer les prérequis
|
|
ansible.builtin.apt:
|
|
state: latest
|
|
name: pipx
|
|
become: true
|
|
|
|
- name: Installer le paquet
|
|
community.general.pipx:
|
|
state: latest
|
|
name: radicale
|
|
install_deps: true
|
|
include_injected: true
|
|
become: true
|
|
environment:
|
|
PIPX_HOME: /opt/pipx
|
|
PIPX_BIN_DIR: /usr/local/bin
|
|
|
|
- name: S'assurer que les exécutables sont inclus dans le path
|
|
ansible.builtin.command:
|
|
cmd: pipx ensurepath
|
|
become: true
|
|
|
|
- name: Créer l'emplacement de stockage
|
|
ansible.builtin.file:
|
|
path: "{{ radicale_root_path }}"
|
|
state: directory
|
|
owner: "{{ radicale_user }}"
|
|
group: "{{ radicale_user }}"
|
|
mode: u=rwX,g=rX,o=
|
|
become: true
|
|
|
|
- name: Déployer le service
|
|
ansible.builtin.template:
|
|
owner: root
|
|
group: root
|
|
mode: u=rw,g=r,o=r
|
|
src: radicale.service.j2
|
|
dest: /etc/systemd/system/radicale.service
|
|
become: true
|
|
notify: Redémarrer radicale.service
|
|
|
|
- name: Déployer la configuration
|
|
ansible.builtin.template:
|
|
owner: root
|
|
group: "{{ radicale_user }}"
|
|
mode: u=rw,g=r,o=
|
|
src: radicale.conf.j2
|
|
dest: "{{ radicale_root_path }}/radicale.conf"
|
|
become: true
|
|
notify: Redémarrer radicale.service
|