Initial commit
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
---
|
||||
- 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
|
||||
Reference in New Issue
Block a user