From 3abc25fbf0eb02438c9de46598e159b9bedfe5d8 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Tue, 29 Oct 2024 10:21:44 +0100 Subject: [PATCH] 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 --- kayobe/kolla_ansible.py | 2 +- kayobe/tests/unit/test_kolla_ansible.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kayobe/kolla_ansible.py b/kayobe/kolla_ansible.py index 1d23647c1..8b0028398 100644 --- a/kayobe/kolla_ansible.py +++ b/kayobe/kolla_ansible.py @@ -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] diff --git a/kayobe/tests/unit/test_kolla_ansible.py b/kayobe/tests/unit/test_kolla_ansible.py index 054508219..23b2eccf8 100644 --- a/kayobe/tests/unit/test_kolla_ansible.py +++ b/kayobe/tests/unit/test_kolla_ansible.py @@ -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)