...
Gitea Branch PR & Ansible Deployment / Check and Create PR (push) Successful in 21s
Gitea Branch PR & Ansible Deployment / Ansible Dry Run (benedikta) (push) Failing after 1m11s
Gitea Branch PR & Ansible Deployment / Ansible Dry Run (rikku) (push) Failing after 1m11s
Gitea Branch PR & Ansible Deployment / Ansible Dry Run (rinoa) (push) Failing after 1m12s
Gitea Branch PR & Ansible Deployment / PR Merge (push) Has been skipped
Gitea Branch PR & Ansible Deployment / Ansible Config Deployment (benedikta) (push) Has been skipped
Gitea Branch PR & Ansible Deployment / Ansible Config Deployment (rikku) (push) Has been skipped
Gitea Branch PR & Ansible Deployment / Ansible Config Deployment (rinoa) (push) Has been skipped

This commit is contained in:
2025-09-14 10:34:08 -04:00
parent 608bc4cc1e
commit ec73c393ea
+4 -11
View File
@@ -15,8 +15,6 @@
paths: "{{ template_base_path }}/{{ inventory_hostname }}"
recurse: true
register: host_files
delegate_to: localhost
run_once: true
changed_when: false
- name: Build list of unique destination directories
@@ -27,19 +25,11 @@
| map(attribute='path')
| map('relpath', template_base_path ~ '/' ~ inventory_hostname)
| map('dirname')
| map('regex_replace', '^(.*)$', appdata_base_path_map[inventory_hostname] ~ '/\1')
| map('regex_replace', '^(.*)$', appdata_base_path ~ '/\1')
| unique
| list
}}
vars:
appdata_base_path_map:
rinoa: "{{ hostvars['rinoa']['appdata_base_path'] }}"
rikku: "{{ hostvars['rikku']['appdata_base_path'] }}"
benedikta: "{{ hostvars['benedikta']['appdata_base_path'] }}"
changed_when: false
delegate_to: localhost
run_once: true
tasks:
- name: Ensure destination directories exist (unique set)
@@ -50,6 +40,7 @@
loop: "{{ dest_dirs }}"
loop_control:
label: "{{ item }}"
changed_when: false # mark pre-existing directories as unchanged
- name: Deploy Jinja2 templates (skip unchanged)
ansible.builtin.template:
@@ -59,6 +50,7 @@
| relpath(template_base_path ~ '/' ~ inventory_hostname)
| regex_replace('\.j2$', '') }}
mode: '0644'
force: no # skip unchanged templates
loop: "{{ host_files.files }}"
loop_control:
label: "{{ item.path }}"
@@ -72,6 +64,7 @@
| relpath(template_base_path ~ '/' ~ inventory_hostname) }}
mode: '0644'
remote_src: false
force: no # skip unchanged files
loop: "{{ host_files.files }}"
loop_control:
label: "{{ item.path }}"