2023-05-24 07:18:31 +00:00
|
|
|
---
|
|
|
|
# tasks file for radicale
|
|
|
|
|
|
|
|
- name: Installer les prérequis
|
2024-06-27 16:51:29 +00:00
|
|
|
ansible.builtin.apt:
|
2023-05-24 07:18:31 +00:00
|
|
|
state: latest
|
2024-06-27 16:51:29 +00:00
|
|
|
name: pipx
|
2023-05-24 07:18:31 +00:00
|
|
|
become: true
|
|
|
|
|
2024-06-27 16:51:29 +00:00
|
|
|
- name: Installer le paquet
|
|
|
|
community.general.pipx:
|
2023-05-24 07:18:31 +00:00
|
|
|
state: latest
|
2024-06-27 16:51:29 +00:00
|
|
|
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
|
2023-05-24 07:18:31 +00:00
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Créer l'emplacement de stockage
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ radicale_root_path }}"
|
|
|
|
state: directory
|
2024-06-27 16:51:29 +00:00
|
|
|
owner: "{{ radicale_user }}"
|
|
|
|
group: "{{ radicale_user }}"
|
2023-05-24 07:18:31 +00:00
|
|
|
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
|
2024-06-27 16:51:29 +00:00
|
|
|
group: "{{ radicale_user }}"
|
2023-05-24 07:18:31 +00:00
|
|
|
mode: u=rw,g=r,o=
|
|
|
|
src: radicale.conf.j2
|
|
|
|
dest: "{{ radicale_root_path }}/radicale.conf"
|
|
|
|
become: true
|
|
|
|
notify: Redémarrer radicale.service
|