Compare commits
2 Commits
9408bf709c
...
d59c9ce1ea
Author | SHA1 | Date | |
---|---|---|---|
d59c9ce1ea | |||
1cfda69e5e |
@ -14,7 +14,6 @@
|
||||
dest: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- /etc/pvc/autobackup.yaml
|
||||
- /etc/systemd/system/pvc-autobackup-normal.timer
|
||||
- /etc/systemd/system/pvc-autobackup-normal.service
|
||||
- /etc/systemd/system/pvc-autobackup-full.timer
|
||||
|
@ -8,11 +8,6 @@
|
||||
- pvc_autobackup.auto_mount.enabled is defined and pvc_autobackup.auto_mount.enabled
|
||||
- pvc_autobackup.auto_mount.packages is defined and pvc_autobackup.auto_mount.packages
|
||||
|
||||
- name: install autobackup YAML configuration
|
||||
template:
|
||||
src: "autobackup/autobackup.yaml.j2"
|
||||
dest: "/etc/pvc/autobackup.yaml"
|
||||
|
||||
- name: install autobackup normal systemd units
|
||||
template:
|
||||
src: "autobackup/pvc-autobackup-normal.{{ item }}.j2"
|
||||
|
@ -29,11 +29,12 @@
|
||||
|
||||
- name: install pvc daemon configuration
|
||||
template:
|
||||
src: pvc/{{ item }}.j2
|
||||
dest: /etc/pvc/{{ item }}
|
||||
src: "pvc/{{ item }}.j2"
|
||||
dest: "/etc/pvc/{{ item }}"
|
||||
mode: 0640
|
||||
with_items:
|
||||
- pvc.conf
|
||||
register: new_daemon_config
|
||||
|
||||
- name: remove obsolete pvc daemon configurations
|
||||
file:
|
||||
@ -43,6 +44,12 @@
|
||||
- pvcnoded.yaml
|
||||
- pvcapid.yaml
|
||||
- autobackup.yaml
|
||||
# Only apply this task when the new daemon config has NOT changed.
|
||||
# In practice, this means that the first time pvc.conf is written,
|
||||
# the old configs will NOT be purged. Then, the next time this is
|
||||
# run (presuming no fundamental changes happen to that config),
|
||||
# they will be removed. Provides safety in case of a failed update.
|
||||
when: not new_daemon_config.changed
|
||||
|
||||
- name: install API SSL certificate file
|
||||
copy:
|
||||
|
Reference in New Issue
Block a user