Compare commits
2 Commits
9408bf709c
...
d59c9ce1ea
Author | SHA1 | Date | |
---|---|---|---|
d59c9ce1ea | |||
1cfda69e5e |
@ -14,7 +14,6 @@
|
|||||||
dest: "{{ item }}"
|
dest: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
loop:
|
loop:
|
||||||
- /etc/pvc/autobackup.yaml
|
|
||||||
- /etc/systemd/system/pvc-autobackup-normal.timer
|
- /etc/systemd/system/pvc-autobackup-normal.timer
|
||||||
- /etc/systemd/system/pvc-autobackup-normal.service
|
- /etc/systemd/system/pvc-autobackup-normal.service
|
||||||
- /etc/systemd/system/pvc-autobackup-full.timer
|
- /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.enabled is defined and pvc_autobackup.auto_mount.enabled
|
||||||
- pvc_autobackup.auto_mount.packages is defined and pvc_autobackup.auto_mount.packages
|
- 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
|
- name: install autobackup normal systemd units
|
||||||
template:
|
template:
|
||||||
src: "autobackup/pvc-autobackup-normal.{{ item }}.j2"
|
src: "autobackup/pvc-autobackup-normal.{{ item }}.j2"
|
||||||
|
@ -29,11 +29,12 @@
|
|||||||
|
|
||||||
- name: install pvc daemon configuration
|
- name: install pvc daemon configuration
|
||||||
template:
|
template:
|
||||||
src: pvc/{{ item }}.j2
|
src: "pvc/{{ item }}.j2"
|
||||||
dest: /etc/pvc/{{ item }}
|
dest: "/etc/pvc/{{ item }}"
|
||||||
mode: 0640
|
mode: 0640
|
||||||
with_items:
|
with_items:
|
||||||
- pvc.conf
|
- pvc.conf
|
||||||
|
register: new_daemon_config
|
||||||
|
|
||||||
- name: remove obsolete pvc daemon configurations
|
- name: remove obsolete pvc daemon configurations
|
||||||
file:
|
file:
|
||||||
@ -43,6 +44,12 @@
|
|||||||
- pvcnoded.yaml
|
- pvcnoded.yaml
|
||||||
- pvcapid.yaml
|
- pvcapid.yaml
|
||||||
- autobackup.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
|
- name: install API SSL certificate file
|
||||||
copy:
|
copy:
|
||||||
|
Reference in New Issue
Block a user