
First part of patchset: https://review.opendev.org/c/openstack/kolla-ansible/+/799229/ in which was suggested to split patch into smaller ones. This implements kolla_container_engine variable in command calls of docker,so later on it can be also used for podman without further change. Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com> Change-Id: Ic30b67daa2e215524096ad1f4385c569e3d41b95
34 lines
970 B
YAML
34 lines
970 B
YAML
---
|
|
- block:
|
|
- name: Check if bifrost_deploy container is running
|
|
become: true
|
|
kolla_container_facts:
|
|
name:
|
|
- bifrost_deploy
|
|
register: container_facts
|
|
|
|
- block:
|
|
# Ensure that all services are stopped gracefully, and in a sensible
|
|
# order.
|
|
- name: Stop services gracefully
|
|
become: true
|
|
command: "{{ kolla_container_engine }} exec bifrost_deploy systemctl stop {{ item }}.service"
|
|
with_items:
|
|
- ironic
|
|
- ironic-inspector
|
|
- mariadb
|
|
- nginx
|
|
|
|
- name: Stopping bifrost_deploy container
|
|
become: true
|
|
kolla_docker:
|
|
action: "stop_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "bifrost_deploy"
|
|
|
|
when: "'bifrost_deploy' in container_facts"
|
|
|
|
when:
|
|
- inventory_hostname in groups['bifrost']
|
|
- "'bifrost_deploy' not in skip_stop_containers"
|