Replace use of kolla-ansible --key argument

The --key argument of kolla-ansible was removed in the rewrite [1].
Replace its use by --vault-password-file introduced ages ago [2].

[1] https://review.opendev.org/c/openstack/kolla-ansible/+/923110
[2] https://review.opendev.org/c/openstack/kolla-ansible/+/504480

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/933633
Change-Id: I8b0882b5c807665ae27550ff6d2ffaf488323f08
This commit is contained in:
Pierre Riteau 2024-10-29 10:21:44 +01:00
parent 66d14fc99f
commit 3abc25fbf0
2 changed files with 4 additions and 4 deletions

View File

@ -144,7 +144,7 @@ def build_args(parsed_args, command, inventory_filename, extra_vars=None,
cmd += ["-" + "v" * verbose_level]
if parsed_args.kolla_playbook:
cmd += ["--playbook", parsed_args.kolla_playbook]
cmd += vault.build_args(parsed_args, "--key")
cmd += vault.build_args(parsed_args, "--vault-password-file")
inventories = _get_inventory_paths(parsed_args, inventory_filename)
for inventory in inventories:
cmd += ["--inventory", inventory]

View File

@ -111,7 +111,7 @@ class TestCase(unittest.TestCase):
".", "/path/to/cwd/venvs/kolla-ansible/bin/activate", "&&",
"kolla-ansible", "command",
"--playbook", "/path/to/playbook",
"--key", "/path/to/kayobe-vault-password-helper",
"--vault-password-file", "/path/to/kayobe-vault-password-helper",
"--inventory", "/path/to/inventory",
"--configdir", "/path/to/config",
"--passwords", "/path/to/config/passwords.yml",
@ -147,7 +147,7 @@ class TestCase(unittest.TestCase):
expected_cmd = [
".", "/path/to/cwd/venvs/kolla-ansible/bin/activate", "&&",
"kolla-ansible", "command",
"--key", "/path/to/vault/pw",
"--vault-password-file", "/path/to/vault/pw",
"--inventory", "/etc/kolla/inventory/overcloud",
]
expected_cmd = " ".join(expected_cmd)
@ -175,7 +175,7 @@ class TestCase(unittest.TestCase):
expected_cmd = [
".", "/path/to/cwd/venvs/kolla-ansible/bin/activate", "&&",
"kolla-ansible", "command",
"--key", "/path/to/kayobe-vault-password-helper",
"--vault-password-file", "/path/to/kayobe-vault-password-helper",
"--inventory", "/etc/kolla/inventory/overcloud",
]
expected_cmd = " ".join(expected_cmd)