diff --git a/ansible/roles/common/defaults/main.yml b/ansible/roles/common/defaults/main.yml index 455dd41230d888eee90087e081452fcbf3835127..390ae29a2a142cc0868851fa3b44818c4bf939fa 100644 --- a/ansible/roles/common/defaults/main.yml +++ b/ansible/roles/common/defaults/main.yml @@ -8,6 +8,7 @@ common_run: False common_services: fluentd: container_name: fluentd + group: all enabled: "{{ enable_fluentd | bool }}" image: "{{ fluentd_image_full }}" environment: @@ -16,6 +17,7 @@ common_services: dimensions: "{{ fluentd_dimensions }}" kolla-toolbox: container_name: kolla_toolbox + group: all enabled: True image: "{{ kolla_toolbox_image_full }}" environment: @@ -27,6 +29,7 @@ common_services: # DUMMY_ENVIRONMENT is needed because empty environment is not supported cron: container_name: cron + group: all enabled: True image: "{{ cron_image_full }}" environment: diff --git a/ansible/roles/service-stop/tasks/main.yml b/ansible/roles/service-stop/tasks/main.yml index d65f438ce4f5d064a7ddcb429637dda6e3ba907c..c8e5604c6f47a0f32475597d01e71c0fd069309e 100644 --- a/ansible/roles/service-stop/tasks/main.yml +++ b/ansible/roles/service-stop/tasks/main.yml @@ -8,6 +8,5 @@ common_options: "{{ docker_common_options }}" name: "{{ service.container_name }}" when: - - service.enabled | bool - service.container_name not in skip_stop_containers - with_dict: "{{ project_services }}" + with_dict: "{{ project_services | select_services_enabled_and_mapped_to_host }}" diff --git a/releasenotes/notes/fix-stop-602430003e8b3c42.yaml b/releasenotes/notes/fix-stop-602430003e8b3c42.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a3c0c5f4dd571eb695f96b3e8dca3bbbae880d37 --- /dev/null +++ b/releasenotes/notes/fix-stop-602430003e8b3c42.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue with the ``kolla-ansible stop`` command where it may fail + trying to stop non-existent containers. `LP#1868596 + <https://bugs.launchpad.net/kolla-ansible/+bug/1868596>`__.