Ensure we're using the stackname for the inventory
Until now, the inventory path used by the overcloud_delete.py was wrong, since it wasn't using the "stackname", leading to a wrong /home/stack/config-download/{}/tripleo-ansible-inventory.yaml path. While it's not a big issue with non-TLS-e deploy, it becomes an actual problem when we involve FreeIPA and TLS-e, since the deletion won't remove the nodes nor services from FreeIPA. Closes-Bug: #1950155 Change-Id: I5941bf9948c5f17e7406d34c21b8de9bd174c063
This commit is contained in:
parent
cfc642646b
commit
9fd913f57c
@ -48,7 +48,7 @@ class TestDeleteOvercloud(deploy_fakes.TestDeployOvercloud):
|
||||
|
||||
mock_run_playbook.assert_called_once_with(
|
||||
['cli-cleanup-ipa.yml', 'cli-overcloud-delete.yaml'],
|
||||
constants.ANSIBLE_INVENTORY,
|
||||
constants.ANSIBLE_INVENTORY.format('overcast'),
|
||||
mock.ANY,
|
||||
constants.ANSIBLE_TRIPLEO_PLAYBOOKS,
|
||||
extra_vars={
|
||||
@ -83,7 +83,7 @@ class TestDeleteOvercloud(deploy_fakes.TestDeployOvercloud):
|
||||
'cli-overcloud-node-unprovision.yaml',
|
||||
'localhost,',
|
||||
mock.ANY,
|
||||
constants.ANSIBLE_TRIPLEO_PLAYBOOKS,
|
||||
constants.ANSIBLE_TRIPLEO_PLAYBOOKS.format('overcast'),
|
||||
extra_vars={
|
||||
"stack_name": "overcast",
|
||||
"baremetal_deployment": mock.ANY,
|
||||
@ -153,7 +153,7 @@ class TestDeleteOvercloud(deploy_fakes.TestDeployOvercloud):
|
||||
|
||||
mock_run_playbook.assert_called_once_with(
|
||||
['cli-overcloud-delete.yaml'],
|
||||
constants.ANSIBLE_INVENTORY,
|
||||
constants.ANSIBLE_INVENTORY.format('overcast'),
|
||||
mock.ANY,
|
||||
constants.ANSIBLE_TRIPLEO_PLAYBOOKS,
|
||||
extra_vars={
|
||||
|
@ -115,7 +115,7 @@ class DeleteOvercloud(command.Command):
|
||||
with utils.TempDirs() as tmp:
|
||||
utils.run_ansible_playbook(
|
||||
playbooks,
|
||||
constants.ANSIBLE_INVENTORY,
|
||||
constants.ANSIBLE_INVENTORY.format(parsed_args.stack),
|
||||
workdir=tmp,
|
||||
playbook_dir=constants.ANSIBLE_TRIPLEO_PLAYBOOKS,
|
||||
verbosity=utils.playbook_verbosity(self=self),
|
||||
|
Loading…
Reference in New Issue
Block a user