zuul-jobs/roles/log-inventory/tasks/main.yaml
Tristan Cacqueray 050f89f067 log-inventory: set inventory_file if needed
Job running without nodeset doesn't have the inventory_file.

Depends-On: https://review.openstack.org/578235
Change-Id: I5d543b4e30746a64d9bd7706ffd52d41e3710ee6
2018-06-27 00:40:50 +00:00

18 lines
429 B
YAML

- name: Set inventory_file fact
set_fact:
inventory_file: "{{ zuul.executor.inventory_file }}"
when: inventory_file is not defined
- name: Ensure Zuul Ansible directory exists
delegate_to: localhost
run_once: true
file:
path: "{{ zuul_info_dir }}"
state: directory
- name: Copy ansible inventory to logs dir
delegate_to: localhost
copy:
src: "{{ inventory_file }}"
dest: "{{ zuul_info_dir }}"