diff --git a/ansible/roles/deploy-containers/tasks/main.yml b/ansible/roles/deploy-containers/tasks/main.yml deleted file mode 100644 index bcbde1629..000000000 --- a/ansible/roles/deploy-containers/tasks/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- include_tasks: "{{ deploy_containers_action }}.yml" diff --git a/ansible/roles/deploy-containers/defaults/main.yml b/ansible/roles/manage-containers/defaults/main.yml similarity index 92% rename from ansible/roles/deploy-containers/defaults/main.yml rename to ansible/roles/manage-containers/defaults/main.yml index 0838be95c..d98bb77df 100644 --- a/ansible/roles/deploy-containers/defaults/main.yml +++ b/ansible/roles/manage-containers/defaults/main.yml @@ -1,6 +1,6 @@ --- # Action to perform: One of: "deploy", "destroy". -deploy_containers_action: "deploy" +manage_containers_action: "deploy" deploy_containers_defaults: comparisons: diff --git a/ansible/roles/deploy-containers/tasks/deploy-container.yml b/ansible/roles/manage-containers/tasks/deploy-container.yml similarity index 100% rename from ansible/roles/deploy-containers/tasks/deploy-container.yml rename to ansible/roles/manage-containers/tasks/deploy-container.yml diff --git a/ansible/roles/deploy-containers/tasks/deploy.yml b/ansible/roles/manage-containers/tasks/deploy.yml similarity index 100% rename from ansible/roles/deploy-containers/tasks/deploy.yml rename to ansible/roles/manage-containers/tasks/deploy.yml diff --git a/ansible/roles/deploy-containers/tasks/destroy-container.yml b/ansible/roles/manage-containers/tasks/destroy-container.yml similarity index 100% rename from ansible/roles/deploy-containers/tasks/destroy-container.yml rename to ansible/roles/manage-containers/tasks/destroy-container.yml diff --git a/ansible/roles/deploy-containers/tasks/destroy.yml b/ansible/roles/manage-containers/tasks/destroy.yml similarity index 100% rename from ansible/roles/deploy-containers/tasks/destroy.yml rename to ansible/roles/manage-containers/tasks/destroy.yml diff --git a/ansible/roles/manage-containers/tasks/main.yml b/ansible/roles/manage-containers/tasks/main.yml new file mode 100644 index 000000000..e1c8de03d --- /dev/null +++ b/ansible/roles/manage-containers/tasks/main.yml @@ -0,0 +1,2 @@ +--- +- include_tasks: "{{ manage_containers_action }}.yml" diff --git a/ansible/seed-deploy-containers.yml b/ansible/seed-deploy-containers.yml deleted file mode 100644 index 585487af8..000000000 --- a/ansible/seed-deploy-containers.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Ensure defined container images are deployed on seed node - hosts: seed - tags: - - seed-deploy-containers - vars: - deploy_containers_action: "{{ kayobe_action }}" - roles: - - role: deploy-containers diff --git a/ansible/seed-manage-containers.yml b/ansible/seed-manage-containers.yml new file mode 100644 index 000000000..dd81a079b --- /dev/null +++ b/ansible/seed-manage-containers.yml @@ -0,0 +1,10 @@ +--- +- name: "Ensure defined container images are {{ kayobe_action }}ed on seed node" + hosts: seed + tags: + - seed-deploy-containers + - seed-manage-containers + vars: + manage_containers_action: "{{ kayobe_action }}" + roles: + - role: manage-containers diff --git a/doc/source/configuration/reference/seed-custom-containers.rst b/doc/source/configuration/reference/seed-custom-containers.rst index b4f3035ac..a6f094c51 100644 --- a/doc/source/configuration/reference/seed-custom-containers.rst +++ b/doc/source/configuration/reference/seed-custom-containers.rst @@ -74,7 +74,7 @@ module page. List of Kayobe applied defaults to required docker_container variables: -.. literalinclude:: ../../../../ansible/roles/deploy-containers/defaults/main.yml +.. literalinclude:: ../../../../ansible/roles/manage-containers/defaults/main.yml :language: yaml diff --git a/kayobe/cli/commands.py b/kayobe/cli/commands.py index adeed5426..170a5698f 100644 --- a/kayobe/cli/commands.py +++ b/kayobe/cli/commands.py @@ -729,7 +729,7 @@ class SeedServiceDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, def take_action(self, parsed_args): self.app.LOG.debug("Deploying seed services") playbooks = _build_playbook_list( - "seed-deploy-containers") + "seed-manage-containers") extra_vars = {"kayobe_action": "deploy"} self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars) self.generate_kolla_ansible_config(parsed_args, service_config=False, @@ -766,7 +766,7 @@ class SeedServiceDestroy(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, extra_vars = {"kayobe_action": "destroy"} playbooks = _build_playbook_list( - "seed-deploy-containers", + "seed-manage-containers", "docker-registry") self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars) @@ -798,7 +798,7 @@ class SeedServiceUpgrade(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, def take_action(self, parsed_args): self.app.LOG.debug("Upgrading seed services") playbooks = _build_playbook_list( - "seed-deploy-containers") + "seed-manage-containers") extra_vars = {"kayobe_action": "deploy"} self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars) self.generate_kolla_ansible_config(parsed_args, service_config=False, @@ -1532,7 +1532,7 @@ class OvercloudServiceDeployContainers(KollaAnsibleMixin, KayobeAnsibleMixin, self.run_kolla_ansible_overcloud(parsed_args, "prechecks") # Perform the kolla-ansible deployment. - self.run_kolla_ansible_overcloud(parsed_args, "deploy-containers") + self.run_kolla_ansible_overcloud(parsed_args, "manage-containers") # Deploy kayobe extra services. playbooks = _build_playbook_list("overcloud-extras") diff --git a/kayobe/tests/unit/cli/test_commands.py b/kayobe/tests/unit/cli/test_commands.py index 56c902e9b..6d49a442d 100644 --- a/kayobe/tests/unit/cli/test_commands.py +++ b/kayobe/tests/unit/cli/test_commands.py @@ -809,7 +809,7 @@ class TestCase(unittest.TestCase): expected_calls = [ mock.call( mock.ANY, - [utils.get_data_files_path("ansible", "seed-deploy-containers.yml")], # noqa + [utils.get_data_files_path("ansible", "seed-manage-containers.yml")], # noqa extra_vars={'kayobe_action': 'deploy'} ), mock.call( @@ -863,7 +863,7 @@ class TestCase(unittest.TestCase): expected_calls = [ mock.call( mock.ANY, - [utils.get_data_files_path("ansible", "seed-deploy-containers.yml")], # noqa + [utils.get_data_files_path("ansible", "seed-manage-containers.yml")], # noqa extra_vars={'kayobe_action': 'deploy'} ), mock.call( @@ -1708,7 +1708,7 @@ class TestCase(unittest.TestCase): ), mock.call( mock.ANY, - "deploy-containers", + "manage-containers", ), ] self.assertListEqual(expected_calls, mock_kolla_run.call_args_list)