...
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
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:
@@ -22,8 +22,8 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Deploy files for this host
|
- name: Set host_files for this host
|
||||||
vars:
|
set_fact:
|
||||||
host_files: >-
|
host_files: >-
|
||||||
{{
|
{{
|
||||||
files_per_host.results
|
files_per_host.results
|
||||||
@@ -31,6 +31,9 @@
|
|||||||
| map(attribute='files')
|
| map(attribute='files')
|
||||||
| first
|
| first
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
- name: Build list of unique destination directories for this host
|
||||||
|
set_fact:
|
||||||
dest_dirs: >-
|
dest_dirs: >-
|
||||||
{{
|
{{
|
||||||
host_files
|
host_files
|
||||||
@@ -41,36 +44,36 @@
|
|||||||
| unique
|
| unique
|
||||||
| list
|
| 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
|
- name: Ensure destination directories exist
|
||||||
ansible.builtin.template:
|
ansible.builtin.file:
|
||||||
src: "{{ item.path }}"
|
path: "{{ item }}"
|
||||||
dest: >-
|
state: directory
|
||||||
{{ appdata_base_path }}/{{ item.path
|
mode: '0755'
|
||||||
| relpath(template_base_path ~ '/' ~ inventory_hostname)
|
loop: "{{ dest_dirs }}"
|
||||||
| regex_replace('\.j2$', '') }}
|
loop_control:
|
||||||
mode: '0644'
|
label: "{{ item }}"
|
||||||
loop: "{{ host_files }}"
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item.path }}"
|
|
||||||
when: item.path.endswith('.j2')
|
|
||||||
|
|
||||||
- name: Deploy static files
|
- name: Deploy Jinja2 templates
|
||||||
ansible.builtin.copy:
|
ansible.builtin.template:
|
||||||
src: "{{ item.path }}"
|
src: "{{ item.path }}"
|
||||||
dest: "{{ appdata_base_path }}/{{ item.path | relpath(template_base_path ~ '/' ~ inventory_hostname) }}"
|
dest: >-
|
||||||
mode: '0644'
|
{{ appdata_base_path }}/{{ item.path
|
||||||
remote_src: false
|
| relpath(template_base_path ~ '/' ~ inventory_hostname)
|
||||||
loop: "{{ host_files }}"
|
| regex_replace('\.j2$', '') }}
|
||||||
loop_control:
|
mode: '0644'
|
||||||
label: "{{ item.path }}"
|
loop: "{{ host_files }}"
|
||||||
when: not item.path.endswith('.j2')
|
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')
|
||||||
|
|||||||
Reference in New Issue
Block a user