16 lines
558 B
YAML
16 lines
558 B
YAML
## The playbook first runs the 'backup.yml' from each role
|
|
- name: create the /backup-dirs file # this also runs on main in case someone doesn't run the backup.yml
|
|
file:
|
|
path: "/backup-dirs"
|
|
state: "touch"
|
|
mode: "0400"
|
|
changed_when: "true" # we always want ti give roles a chance to register dirs
|
|
|
|
- name: Ensure file contains lines from array # this also runs on main in case someone doesn't run the backup.yml
|
|
lineinfile:
|
|
path: /backup-dirs
|
|
line: "{{ item }}"
|
|
create: yes
|
|
state: present
|
|
loop: "{{ extra_backup_paths }}"
|