[TRAIN-ONLY] Fix inventory path when upgrading

This change ensures that the inventory function returns the inventory file
path instead of the inventory content when we run
external_update/upgrade. Without this review the funtion
returns inventory content which may not be parsed correctly as
external_* don't use mistral when the playbooks are executed.

rhbz: 1944321
Change-Id: I6aa9056939c9cc5311034160c790e4893e7d7ce5
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
Kevin Carter
2021-04-01 08:31:58 -05:00
committed by Sergii Golovatiuk
parent bcc25ecd24
commit 320fbda953
2 changed files with 4 additions and 2 deletions

View File

@@ -142,7 +142,8 @@ class ExternalUpdateRun(command.Command):
# Run ansible:
inventory = oooutils.get_tripleo_ansible_inventory(
parsed_args.static_inventory, parsed_args.ssh_user, stack)
parsed_args.static_inventory, parsed_args.ssh_user, stack,
return_inventory_file_path=True)
limit_hosts = oooutils.playbook_limit_parse(
limit_nodes=parsed_args.limit)
playbook = 'all'

View File

@@ -143,7 +143,8 @@ class ExternalUpgradeRun(command.Command):
# Run ansible:
inventory = oooutils.get_tripleo_ansible_inventory(
parsed_args.static_inventory, parsed_args.ssh_user, stack)
parsed_args.static_inventory, parsed_args.ssh_user, stack,
return_inventory_file_path=True)
limit_hosts = oooutils.playbook_limit_parse(
limit_nodes=parsed_args.limit)
playbook = 'all'