[ANSIBLE] Automated PR for dagu-mariadb-bkup-config-check_2025-09-13T08-18-48 - #18 #18
@@ -15,9 +15,8 @@
|
|||||||
paths: "{{ template_base_path }}/{{ inventory_hostname }}"
|
paths: "{{ template_base_path }}/{{ inventory_hostname }}"
|
||||||
recurse: true
|
recurse: true
|
||||||
register: host_files
|
register: host_files
|
||||||
|
run_once: true # can remain run_once, finds files once for all hosts
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
run_once: true
|
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- name: Build list of unique destination directories
|
- name: Build list of unique destination directories
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
@@ -27,13 +26,12 @@
|
|||||||
| map(attribute='path')
|
| map(attribute='path')
|
||||||
| map('relpath', template_base_path ~ '/' ~ inventory_hostname)
|
| map('relpath', template_base_path ~ '/' ~ inventory_hostname)
|
||||||
| map('dirname')
|
| map('dirname')
|
||||||
| map('regex_replace', '^(.*)$', hostvars[inventory_hostname]['appdata_base_path'] ~ '/\\1')
|
| map('regex_replace', '^(.*)$', appdata_base_path ~ '/\\1')
|
||||||
| unique
|
| unique
|
||||||
| list
|
| list
|
||||||
}}
|
}}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
delegate_to: localhost
|
run_once: false
|
||||||
run_once: true
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Ensure destination directories exist (unique set)
|
- name: Ensure destination directories exist (unique set)
|
||||||
|
|||||||
Reference in New Issue
Block a user