--- # tasks file for radicale - name: Install prerequisites ansible.builtin.apt: state: latest name: pipx become: true - name: Install radicale 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: Ensure pipx is in path ansible.builtin.command: cmd: pipx ensurepath become: true - name: Create storage path ansible.builtin.file: path: "{{ radicale_root_path }}" state: directory owner: "{{ radicale_user }}" group: "{{ radicale_user }}" mode: u=rwX,g=rX,o= become: true - name: Deploy 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: Restart radicale.service - name: Deploy authentication file ansible.builtin.template: src: users.htpasswd.j2 dest: "{{ radicale_root_path }}/users.htpasswd" owner: root group: "{{ radicale_user }}" mode: u=rw,g=r,o= become: true notify: Restart radicale.service - name: Deploy configuration file ansible.builtin.template: src: radicale.conf.j2 dest: "{{ radicale_root_path }}/radicale.conf" owner: root group: "{{ radicale_user }}" mode: u=rw,g=r,o= become: true notify: Restart radicale.service