1
0
Fork 0
ansible-collection-kit/roles/radicale/tasks/main.yml
Daniele Tricoli af2b07c577
All checks were successful
continuous-integration/drone/push Build is passing
enable radicale uWSGI service
2021-12-23 01:06:56 +01:00

43 lines
1.1 KiB
YAML

---
- block:
- name: install radicale
ansible.builtin.apt:
name:
- radicale
- uwsgi
- uwsgi-plugin-python3
state: present
update_cache: true
cache_valid_time: 3600
- name: configure radicale
ansible.builtin.lineinfile:
path: /etc/radicale/config
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
state: present
with_items:
- regexp: "^#?type = remote_user"
line: "type = htpasswd"
- regexp: "^#?htpasswd_filename = /etc/radicale/users"
line: "htpasswd_filename = /etc/radicale/users"
- regexp: "^#?htpasswd_encryption = md5"
line: "htpasswd_encryption = bcrypt"
- name: set radicale users and password
ansible.builtin.template:
src: etc/radicale/users.j2
dest: /etc/radicale/users
mode: 0640
- name: enable radicale uWSGI service
ansible.builtin.file:
src: /etc/uwsgi/apps-available/radicale.ini
path: /etc/uwsgi/apps-enabled/radicale.ini
state: link
notify: systemctl restart uwsgi
become: "{{ radicale_become }}"
become_user: "{{ radicale_become_user }}"