Set slightly more accurate name for the manage containers role
Follow-up on I43a9c2a57fcfe2c9d84f39903aac7c258f9a897f. As discussed before we set slightly more accurate name for the manage containers role since using 'deploy-containers' role with action 'destroy' can be a little confusing. Change-Id: I6d4a3479d492e0fe86ce3de7414fa47c584577ea Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
This commit is contained in:
parent
f8f8cabc4f
commit
e3c1efc865
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
- include_tasks: "{{ deploy_containers_action }}.yml"
|
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
# Action to perform: One of: "deploy", "destroy".
|
# Action to perform: One of: "deploy", "destroy".
|
||||||
deploy_containers_action: "deploy"
|
manage_containers_action: "deploy"
|
||||||
|
|
||||||
deploy_containers_defaults:
|
deploy_containers_defaults:
|
||||||
comparisons:
|
comparisons:
|
2
ansible/roles/manage-containers/tasks/main.yml
Normal file
2
ansible/roles/manage-containers/tasks/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
- include_tasks: "{{ manage_containers_action }}.yml"
|
@ -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
|
|
10
ansible/seed-manage-containers.yml
Normal file
10
ansible/seed-manage-containers.yml
Normal file
@ -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
|
@ -74,7 +74,7 @@ module page.
|
|||||||
|
|
||||||
List of Kayobe applied defaults to required docker_container variables:
|
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
|
:language: yaml
|
||||||
|
|
||||||
|
|
||||||
|
@ -729,7 +729,7 @@ class SeedServiceDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
|
|||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
self.app.LOG.debug("Deploying seed services")
|
self.app.LOG.debug("Deploying seed services")
|
||||||
playbooks = _build_playbook_list(
|
playbooks = _build_playbook_list(
|
||||||
"seed-deploy-containers")
|
"seed-manage-containers")
|
||||||
extra_vars = {"kayobe_action": "deploy"}
|
extra_vars = {"kayobe_action": "deploy"}
|
||||||
self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars)
|
self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars)
|
||||||
self.generate_kolla_ansible_config(parsed_args, service_config=False,
|
self.generate_kolla_ansible_config(parsed_args, service_config=False,
|
||||||
@ -766,7 +766,7 @@ class SeedServiceDestroy(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
|
|||||||
|
|
||||||
extra_vars = {"kayobe_action": "destroy"}
|
extra_vars = {"kayobe_action": "destroy"}
|
||||||
playbooks = _build_playbook_list(
|
playbooks = _build_playbook_list(
|
||||||
"seed-deploy-containers",
|
"seed-manage-containers",
|
||||||
"docker-registry")
|
"docker-registry")
|
||||||
self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars)
|
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):
|
def take_action(self, parsed_args):
|
||||||
self.app.LOG.debug("Upgrading seed services")
|
self.app.LOG.debug("Upgrading seed services")
|
||||||
playbooks = _build_playbook_list(
|
playbooks = _build_playbook_list(
|
||||||
"seed-deploy-containers")
|
"seed-manage-containers")
|
||||||
extra_vars = {"kayobe_action": "deploy"}
|
extra_vars = {"kayobe_action": "deploy"}
|
||||||
self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars)
|
self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars)
|
||||||
self.generate_kolla_ansible_config(parsed_args, service_config=False,
|
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")
|
self.run_kolla_ansible_overcloud(parsed_args, "prechecks")
|
||||||
|
|
||||||
# Perform the kolla-ansible deployment.
|
# 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.
|
# Deploy kayobe extra services.
|
||||||
playbooks = _build_playbook_list("overcloud-extras")
|
playbooks = _build_playbook_list("overcloud-extras")
|
||||||
|
@ -809,7 +809,7 @@ class TestCase(unittest.TestCase):
|
|||||||
expected_calls = [
|
expected_calls = [
|
||||||
mock.call(
|
mock.call(
|
||||||
mock.ANY,
|
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'}
|
extra_vars={'kayobe_action': 'deploy'}
|
||||||
),
|
),
|
||||||
mock.call(
|
mock.call(
|
||||||
@ -863,7 +863,7 @@ class TestCase(unittest.TestCase):
|
|||||||
expected_calls = [
|
expected_calls = [
|
||||||
mock.call(
|
mock.call(
|
||||||
mock.ANY,
|
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'}
|
extra_vars={'kayobe_action': 'deploy'}
|
||||||
),
|
),
|
||||||
mock.call(
|
mock.call(
|
||||||
@ -1708,7 +1708,7 @@ class TestCase(unittest.TestCase):
|
|||||||
),
|
),
|
||||||
mock.call(
|
mock.call(
|
||||||
mock.ANY,
|
mock.ANY,
|
||||||
"deploy-containers",
|
"manage-containers",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
self.assertListEqual(expected_calls, mock_kolla_run.call_args_list)
|
self.assertListEqual(expected_calls, mock_kolla_run.call_args_list)
|
||||||
|
Loading…
Reference in New Issue
Block a user