From f3dbda1821838e003e814ce38235850f8bc71b2c Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 20 Dec 2017 17:58:49 +0000 Subject: [PATCH] Create and install kolla-ansible virtual environment in host configure This ensures that even if the version of kolla-ansible in use does not have support for remote virtualenvs (patch still in review), the default configuration of using remote virtualenvs for kolla-ansible still works. --- kayobe/cli/commands.py | 6 ++++-- kayobe/tests/unit/cli/test_commands.py | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kayobe/cli/commands.py b/kayobe/cli/commands.py index f4596feab..61b43b4f8 100644 --- a/kayobe/cli/commands.py +++ b/kayobe/cli/commands.py @@ -412,7 +412,8 @@ class SeedHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, extra_vars=extra_vars) # Run final kayobe playbooks. - playbooks = _build_playbook_list("kolla-host", "docker") + playbooks = _build_playbook_list( + "kolla-target-venv", "kolla-host", "docker") self.run_kayobe_playbooks(parsed_args, playbooks, limit="seed") @@ -700,7 +701,8 @@ class OvercloudHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, extra_vars=extra_vars) # Further kayobe playbooks. - playbooks = _build_playbook_list("kolla-host", "docker") + playbooks = _build_playbook_list( + "kolla-target-venv", "kolla-host", "docker") self.run_kayobe_playbooks(parsed_args, playbooks, limit="overcloud") diff --git a/kayobe/tests/unit/cli/test_commands.py b/kayobe/tests/unit/cli/test_commands.py index 70ef75334..237ce8284 100644 --- a/kayobe/tests/unit/cli/test_commands.py +++ b/kayobe/tests/unit/cli/test_commands.py @@ -186,6 +186,7 @@ class TestCase(unittest.TestCase): mock.call( mock.ANY, [ + "ansible/kolla-target-venv.yml", "ansible/kolla-host.yml", "ansible/docker.yml", ], @@ -427,6 +428,7 @@ class TestCase(unittest.TestCase): mock.call( mock.ANY, [ + "ansible/kolla-target-venv.yml", "ansible/kolla-host.yml", "ansible/docker.yml", ],