airshipctl/roles/airship-airshipctl-gather-configs/tasks/main.yaml
Kostiantyn Kalynovskyi 44267cbae9 add role to collect airship config directory
Change-Id: Iafab45d09682007919229aab94d970b550f6635d
2020-02-10 21:08:14 +00:00

18 lines
559 B
YAML

- 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