diff --git a/ansible/roles/masakari/tasks/check-containers.yml b/ansible/roles/masakari/tasks/check-containers.yml new file mode 100644 index 0000000000..37ab002434 --- /dev/null +++ b/ansible/roles/masakari/tasks/check-containers.yml @@ -0,0 +1,17 @@ +--- +- name: Check masakari containers + become: true + kolla_docker: + action: "compare_container" + common_options: "{{ docker_common_options }}" + name: "{{ item.value.container_name }}" + image: "{{ item.value.image }}" + privileged: "{{ item.value.privileged | default(False) }}" + volumes: "{{ item.value.volumes | reject('equalto', '') | list }}" + dimensions: "{{ item.value.dimensions }}" + when: + - inventory_hostname in groups[item.value.group] + - item.value.enabled | bool + with_dict: "{{ masakari_services }}" + notify: + - Restart {{ item.key }} container diff --git a/ansible/roles/masakari/tasks/config.yml b/ansible/roles/masakari/tasks/config.yml index 047814dcb1..043b0b43e7 100644 --- a/ansible/roles/masakari/tasks/config.yml +++ b/ansible/roles/masakari/tasks/config.yml @@ -132,20 +132,5 @@ notify: - Restart masakari-api container -- name: Check masakari containers - become: true - kolla_docker: - action: "compare_container" - common_options: "{{ docker_common_options }}" - name: "{{ item.value.container_name }}" - image: "{{ item.value.image }}" - privileged: "{{ item.value.privileged | default(False) }}" - volumes: "{{ item.value.volumes | reject('equalto', '') | list }}" - dimensions: "{{ item.value.dimensions }}" - when: - - kolla_action != "config" - - inventory_hostname in groups[item.value.group] - - item.value.enabled | bool - with_dict: "{{ masakari_services }}" - notify: - - Restart {{ item.key }} container +- import_tasks: check-containers.yml + when: kolla_action != "config" diff --git a/ansible/roles/masakari/tasks/deploy-containers.yml b/ansible/roles/masakari/tasks/deploy-containers.yml new file mode 100644 index 0000000000..eb24ab5c7a --- /dev/null +++ b/ansible/roles/masakari/tasks/deploy-containers.yml @@ -0,0 +1,2 @@ +--- +- import_tasks: check-containers.yml diff --git a/releasenotes/notes/bug-1889611-f08c228fca884bf2.yaml b/releasenotes/notes/bug-1889611-f08c228fca884bf2.yaml new file mode 100644 index 0000000000..979b97fe97 --- /dev/null +++ b/releasenotes/notes/bug-1889611-f08c228fca884bf2.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes ``deploy-containers`` action missing for the Masakari role. + `LP#1889611 `__