Merge "Create yaml file of the zuul job vars for embedded ansible"
This commit is contained in:
commit
8c7b7f6035
@ -23,6 +23,7 @@
|
|||||||
install_methods:
|
install_methods:
|
||||||
- distro
|
- distro
|
||||||
- source
|
- source
|
||||||
|
zuul_user_vars_file: "{{ ansible_env.HOME }}/osa-job-vars.yml"
|
||||||
tasks:
|
tasks:
|
||||||
- name: Dynamically create scenario if not set
|
- name: Dynamically create scenario if not set
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -110,3 +111,13 @@
|
|||||||
src: osa-gate-scenario.yml.j2
|
src: osa-gate-scenario.yml.j2
|
||||||
dest: "{{ zuul.executor.work_root }}/osa-gate-scenario.yml"
|
dest: "{{ zuul.executor.work_root }}/osa-gate-scenario.yml"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
|
# Other playbooks can consume this vars file to access the
|
||||||
|
# Zuul job variables, see https://zuul-ci.org/docs/zuul/reference/jobs.html#user-jobs-job-variables
|
||||||
|
- name: Record the zuul user job variables for future use by embedded ansible
|
||||||
|
vars:
|
||||||
|
zuul_helper_var:
|
||||||
|
zuul: "{{ zuul }}"
|
||||||
|
template:
|
||||||
|
src: osa-job-vars.yml.j2
|
||||||
|
dest: "{{ zuul_user_vars_file }}"
|
||||||
|
@ -3,3 +3,4 @@
|
|||||||
scenario: {{ scenario | to_json }}
|
scenario: {{ scenario | to_json }}
|
||||||
action: {{ action | to_json }}
|
action: {{ action | to_json }}
|
||||||
install_method: {{ install_method | to_json }}
|
install_method: {{ install_method | to_json }}
|
||||||
|
zuul_user_vars_file: {{ zuul_user_vars_file }}
|
||||||
|
2
zuul.d/playbooks/templates/osa-job-vars.yml.j2
Normal file
2
zuul.d/playbooks/templates/osa-job-vars.yml.j2
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
{{ zuul_helper_var | to_nice_yaml(indent=2) }}
|
Loading…
x
Reference in New Issue
Block a user