Don't inject facts as vars

This commit is contained in:
2020-06-27 15:56:55 +02:00
parent bce3dc670b
commit 38b3239854
18 changed files with 73 additions and 72 deletions
+6 -6
View File
@@ -8,7 +8,7 @@
- name: Copy config to home directory
copy:
src: home/
dest: "{{ ansible_env.HOME }}/"
dest: "{{ ansible_facts.env.HOME }}/"
mode: preserve
tags: radicale-update
notify: Restart Radicale
@@ -16,13 +16,13 @@
- name: Copy service config
template:
src: service.ini.j2
dest: "{{ ansible_env.HOME }}/etc/services.d/radicale.ini"
dest: "{{ ansible_facts.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"
dest: "{{ ansible_facts.env.HOME }}/radicale/config"
tags: radicale-update
notify: Restart Radicale
@@ -52,12 +52,12 @@
- name: Initialize storage repository
command:
chdir: "{{ ansible_env.HOME }}/radicale/storage"
chdir: "{{ ansible_facts.env.HOME }}/radicale/storage"
cmd: git init
creates: "{{ ansible_env.HOME }}/radicale/storage/.git"
creates: "{{ ansible_facts.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
job: git --git-dir {{ ansible_facts.env.HOME }}/radicale/storage/.git gc
+3 -3
View File
@@ -3,14 +3,14 @@ hosts = 0.0.0.0:8080
[auth]
type = htpasswd
htpasswd_filename = {{ ansible_env.HOME }}/radicale/users
htpasswd_filename = {{ ansible_facts.env.HOME }}/radicale/users
htpasswd_encryption = bcrypt
realm = bstl DAV - Password Required
[rights]
type = from_file
file = {{ ansible_env.HOME }}/radicale/rights
file = {{ ansible_facts.env.HOME }}/radicale/rights
[storage]
filesystem_folder = {{ ansible_env.HOME }}/radicale/storage
filesystem_folder = {{ ansible_facts.env.HOME }}/radicale/storage
hook = git add -A && (git diff --cached --quiet || git commit -m "Changes by "%(user)s)
+1 -1
View File
@@ -1,4 +1,4 @@
[program:radicale]
command={{ ansible_env.HOME }}/.local/bin/radicale --config {{ ansible_env.HOME }}/radicale/config
command={{ ansible_facts.env.HOME }}/.local/bin/radicale --config {{ ansible_facts.env.HOME }}/radicale/config
autostart=yes
autorestart=yes