Merge "add role to collect airship config directory"

This commit is contained in:
Zuul 2020-02-13 20:18:00 +00:00 committed by Gerrit Code Review
commit f847dc9fea
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