[Stable-Only]Reversing the legacy directory conditional
The legacy directory can exist, but the validations don't have to be there.
In such a case, the legacy directory would still be used by VF,
instead of the new directory containing validation playbooks.
This patch reverses the condition, so that the client first
attempts to use the new validations playbook directory,
and only if it doesn't exist falls back to the legacy one.
Resolves: rhbz#2001968
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
(cherry picked from commit 9a586eb25d)
Change-Id: I7ee49c0c342e31f75726e12a2a78b1d8f47c6285
This commit is contained in:
@@ -105,12 +105,12 @@ TRIPLEO_STATIC_INVENTORY = 'tripleo-ansible-inventory.yaml'
|
||||
|
||||
ANSIBLE_INVENTORY = os.path.join(DEFAULT_WORK_DIR,
|
||||
'{}/', TRIPLEO_STATIC_INVENTORY)
|
||||
|
||||
ANSIBLE_VALIDATION_DIR = (
|
||||
os.path.join(DEFAULT_VALIDATIONS_LEGACY_BASEDIR, 'playbooks')
|
||||
if os.path.exists(os.path.join(DEFAULT_VALIDATIONS_LEGACY_BASEDIR,
|
||||
'playbooks'))
|
||||
else "/usr/share/ansible/validation-playbooks"
|
||||
)
|
||||
"/usr/share/ansible/validation-playbooks"
|
||||
if os.path.exists("/usr/share/ansible/validation-playbooks")
|
||||
else os.path.join(DEFAULT_VALIDATIONS_LEGACY_BASEDIR,
|
||||
'playbooks'))
|
||||
|
||||
ANSIBLE_TRIPLEO_PLAYBOOKS = \
|
||||
'/usr/share/ansible/tripleo-playbooks'
|
||||
|
||||
Reference in New Issue
Block a user