Override inventory var value if the job defines it's own

The default value of the variable 'inventory' of the validations.yml
playbook remains the same. However, if the zuul job defines alternative
inventory for the VF to use, it will be used instead.

Without exposing the variable to the job, the inventory path is hard set
and can not be adjusted to match exact location of the inventory.
This poses problem for validation execution.
As VF relies on inventory information to match validations to hosts.

Also removes conditional for older releases.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Ia15063cabc65e2ae685e2f9dcaec9d25b05b4db8
This commit is contained in:
Jiri Podivin
2021-10-18 13:04:54 +02:00
parent 4e3ac48544
commit 38dc6f32c9

View File

@@ -3,7 +3,7 @@
hosts: undercloud
gather_facts: true
vars:
inventory: "tripleo-deploy/tripleo-ansible-inventory.yaml"
inventory: "{{ job.validations_inventory|default('tripleo-deploy/tripleo-ansible-inventory.yaml') }}"
vf_log_dir: "/var/log/validations"
tags:
- overcloud-deploy
@@ -13,4 +13,3 @@
name: validations
when:
- job.enable_validation|default(false)|bool
- release not in ['queens', 'stein']