add role to collect airship config directory

Change-Id: Iafab45d09682007919229aab94d970b550f6635d
This commit is contained in:
Kostiantyn Kalynovskyi 2020-02-10 20:46:32 +00:00
parent 6e8ca5b010
commit 44267cbae9
2 changed files with 19 additions and 0 deletions

View File

@ -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

View File

@ -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