log-inventory: add missing zuul_info_dir prep

The role can't be used as-is without zuul_info_dir fact.

Change-Id: Id785f1b10e60dd09342edcebcbe7923b161add3c
This commit is contained in:
Tristan Cacqueray 2018-06-24 23:42:02 +00:00
parent fbb58ddfde
commit 8ed7cf4c52
3 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,10 @@
Log the inventory used to run the job to the job's log dir.
This will result in the log collection roles logging the job inventory.
**Role Variables**
.. zuul:rolevar:: zuul_info_dir
:default: {{ zuul.executor.log_root }}/zuul-info
The directory path to store the inventory file.

View File

@ -0,0 +1,2 @@
---
zuul_info_dir: "{{ zuul.executor.log_root }}/zuul-info"

View File

@ -1,3 +1,10 @@
- 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: