...
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
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:
@@ -15,8 +15,6 @@
|
|||||||
paths: "{{ template_base_path }}/{{ inventory_hostname }}"
|
paths: "{{ template_base_path }}/{{ inventory_hostname }}"
|
||||||
recurse: true
|
recurse: true
|
||||||
register: host_files
|
register: host_files
|
||||||
delegate_to: localhost
|
|
||||||
run_once: true
|
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Build list of unique destination directories
|
- name: Build list of unique destination directories
|
||||||
@@ -27,19 +25,11 @@
|
|||||||
| 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', '^(.*)$', appdata_base_path_map[inventory_hostname] ~ '/\1')
|
| map('regex_replace', '^(.*)$', appdata_base_path ~ '/\1')
|
||||||
| unique
|
| unique
|
||||||
| list
|
| 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
|
changed_when: false
|
||||||
delegate_to: localhost
|
|
||||||
run_once: true
|
|
||||||
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Ensure destination directories exist (unique set)
|
- name: Ensure destination directories exist (unique set)
|
||||||
@@ -50,6 +40,7 @@
|
|||||||
loop: "{{ dest_dirs }}"
|
loop: "{{ dest_dirs }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item }}"
|
label: "{{ item }}"
|
||||||
|
changed_when: false # mark pre-existing directories as unchanged
|
||||||
|
|
||||||
- name: Deploy Jinja2 templates (skip unchanged)
|
- name: Deploy Jinja2 templates (skip unchanged)
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
@@ -59,6 +50,7 @@
|
|||||||
| relpath(template_base_path ~ '/' ~ inventory_hostname)
|
| relpath(template_base_path ~ '/' ~ inventory_hostname)
|
||||||
| regex_replace('\.j2$', '') }}
|
| regex_replace('\.j2$', '') }}
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
force: no # skip unchanged templates
|
||||||
loop: "{{ host_files.files }}"
|
loop: "{{ host_files.files }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.path }}"
|
label: "{{ item.path }}"
|
||||||
@@ -72,6 +64,7 @@
|
|||||||
| relpath(template_base_path ~ '/' ~ inventory_hostname) }}
|
| relpath(template_base_path ~ '/' ~ inventory_hostname) }}
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
remote_src: false
|
remote_src: false
|
||||||
|
force: no # skip unchanged files
|
||||||
loop: "{{ host_files.files }}"
|
loop: "{{ host_files.files }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.path }}"
|
label: "{{ item.path }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user