...
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 1m28s
Gitea Branch PR & Ansible Deployment / Ansible Dry Run (rikku) (push) Failing after 1m28s
Gitea Branch PR & Ansible Deployment / Ansible Dry Run (rinoa) (push) Failing after 1m28s
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 11:59:47 -04:00
parent 480ea26964
commit 5bf0123aa3
+36 -33
View File
@@ -22,8 +22,8 @@
changed_when: false
tasks:
- name: Deploy files for this host
vars:
- name: Set host_files for this host
set_fact:
host_files: >-
{{
files_per_host.results
@@ -31,6 +31,9 @@
| map(attribute='files')
| first
}}
- name: Build list of unique destination directories for this host
set_fact:
dest_dirs: >-
{{
host_files
@@ -41,36 +44,36 @@
| unique
| list
}}
block:
- name: Ensure destination directories exist
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: '0755'
loop: "{{ dest_dirs }}"
loop_control:
label: "{{ item }}"
- name: Deploy Jinja2 templates
ansible.builtin.template:
src: "{{ item.path }}"
dest: >-
{{ appdata_base_path }}/{{ item.path
| relpath(template_base_path ~ '/' ~ inventory_hostname)
| regex_replace('\.j2$', '') }}
mode: '0644'
loop: "{{ host_files }}"
loop_control:
label: "{{ item.path }}"
when: item.path.endswith('.j2')
- name: Ensure destination directories exist
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: '0755'
loop: "{{ dest_dirs }}"
loop_control:
label: "{{ item }}"
- name: Deploy static files
ansible.builtin.copy:
src: "{{ item.path }}"
dest: "{{ appdata_base_path }}/{{ item.path | relpath(template_base_path ~ '/' ~ inventory_hostname) }}"
mode: '0644'
remote_src: false
loop: "{{ host_files }}"
loop_control:
label: "{{ item.path }}"
when: not item.path.endswith('.j2')
- name: Deploy Jinja2 templates
ansible.builtin.template:
src: "{{ item.path }}"
dest: >-
{{ appdata_base_path }}/{{ item.path
| relpath(template_base_path ~ '/' ~ inventory_hostname)
| regex_replace('\.j2$', '') }}
mode: '0644'
loop: "{{ host_files }}"
loop_control:
label: "{{ item.path }}"
when: item.path.endswith('.j2')
- name: Deploy static files
ansible.builtin.copy:
src: "{{ item.path }}"
dest: "{{ appdata_base_path }}/{{ item.path | relpath(template_base_path ~ '/' ~ inventory_hostname) }}"
mode: '0644'
remote_src: false
loop: "{{ host_files }}"
loop_control:
label: "{{ item.path }}"
when: not item.path.endswith('.j2')