diff --git a/playbooks/airship-collect-logs.yml b/playbooks/airship-collect-logs.yml index fb9bb1f3d..ebeae33f6 100644 --- a/playbooks/airship-collect-logs.yml +++ b/playbooks/airship-collect-logs.yml @@ -19,6 +19,7 @@ - gather-host-logs - airship-gather-sushy-logs - airship-gather-libvirt-logs + - airship-airshipctl-gather-configs environment: LIBVIRT_DEFAULT_URI: qemu:///system diff --git a/roles/airship-airshipctl-gather-configs/tasks/main.yaml b/roles/airship-airshipctl-gather-configs/tasks/main.yaml new file mode 100644 index 000000000..df932a10a --- /dev/null +++ b/roles/airship-airshipctl-gather-configs/tasks/main.yaml @@ -0,0 +1,18 @@ +- name: set airshipctl config directory + set_fact: + airshipctl_config_dir: "{{ ansible_env.HOME }}/.airship" + +- name: collect airshipctl config + ignore_errors: True + block: + - name: check if rules file exists + stat: + path: "{{ airshipctl_config_dir }}" + register: config_dir_stats + + - name: "Downloads airshipconfig directory to executor" + synchronize: + src: "{{ airshipctl_config_dir }}" + dest: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}" + mode: pull + when: config_dir_stats.stat.exists \ No newline at end of file