Fixing some delegation and removing a become directive
This commit is contained in:
parent
75ad0e053b
commit
120f3f8a26
@ -97,8 +97,6 @@
|
|||||||
dest: "{{ backup_location }}/{{ inventory_hostname }}_{{ now().strftime('%Y%m%d%H%M%S') }}.xml"
|
dest: "{{ backup_location }}/{{ inventory_hostname }}_{{ now().strftime('%Y%m%d%H%M%S') }}.xml"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
delegate_to: blacktide
|
delegate_to: blacktide
|
||||||
become: true
|
|
||||||
become_method: sudo
|
|
||||||
no_log: "{{ pfsense_backup_disable_logging | default(false) }}"
|
no_log: "{{ pfsense_backup_disable_logging | default(false) }}"
|
||||||
|
|
||||||
- name: Find all PFSense backups for the current host
|
- name: Find all PFSense backups for the current host
|
||||||
@ -106,6 +104,7 @@
|
|||||||
paths: "{{ backup_location }}"
|
paths: "{{ backup_location }}"
|
||||||
patterns: "{{ inventory_hostname }}*"
|
patterns: "{{ inventory_hostname }}*"
|
||||||
register: all_pfsense_backups
|
register: all_pfsense_backups
|
||||||
|
delegate_to: blacktide
|
||||||
|
|
||||||
- name: If too many backups kept
|
- name: If too many backups kept
|
||||||
when: all_pfsense_backups | length > backup_number_to_keep
|
when: all_pfsense_backups | length > backup_number_to_keep
|
||||||
@ -121,6 +120,7 @@
|
|||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
loop: "{{ oldest_file_paths }}"
|
loop: "{{ oldest_file_paths }}"
|
||||||
|
delegate_to: blacktide
|
||||||
|
|
||||||
- name: Docker Infrastructure Compose Backups
|
- name: Docker Infrastructure Compose Backups
|
||||||
hosts: docker_nodes
|
hosts: docker_nodes
|
||||||
|
Loading…
Reference in New Issue
Block a user