You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
---
|
|
- name: Add DAV domain to Uberspace config
|
|
import_role:
|
|
name: snapstromegon.uberspace_web_domain
|
|
vars:
|
|
domain: dav.bstl.xyz
|
|
|
|
- name: Copy config to home directory
|
|
copy:
|
|
src: home/
|
|
dest: "{{ ansible_env.HOME }}/"
|
|
mode: preserve
|
|
tags: radicale-update
|
|
notify: Restart Radicale
|
|
|
|
- name: Copy service config
|
|
template:
|
|
src: service.ini.j2
|
|
dest: "{{ ansible_env.HOME }}/etc/services.d/radicale.ini"
|
|
notify: Reread service config
|
|
|
|
- name: Copy app config
|
|
template:
|
|
src: config.j2
|
|
dest: "{{ ansible_env.HOME }}/radicale/config"
|
|
tags: radicale-update
|
|
notify: Restart Radicale
|
|
|
|
- name: Set up Radicale users
|
|
template:
|
|
src: users.j2
|
|
dest: "{{ ansible_facts.env.HOME }}/radicale/users"
|
|
tags: radicale-update
|
|
notify: Restart Radicale
|
|
|
|
- name: Configure web backend
|
|
import_role:
|
|
name: snapstromegon.uberspace_web_backend
|
|
vars:
|
|
route: dav.bstl.xyz
|
|
http:
|
|
port: 8080
|
|
|
|
- name: Install and update Radicale
|
|
pip:
|
|
name: radicale[bcrypt]
|
|
state: latest
|
|
extra_args: --user
|
|
executable: pip3.8
|
|
tags: radicale-update
|
|
notify: Restart Radicale
|
|
|
|
- name: Initialize storage repository
|
|
command:
|
|
chdir: "{{ ansible_env.HOME }}/radicale/storage"
|
|
cmd: git init
|
|
creates: "{{ ansible_env.HOME }}/radicale/storage/.git"
|
|
|
|
- name: Set up garbage collection cronjob
|
|
cron:
|
|
name: "Garbage-collection"
|
|
special_time: weekly
|
|
job: git --git-dir {{ ansible_env.HOME }}/radicale/storage/.git gc
|