kolla-ansible/ansible/roles/bifrost/tasks/stop.yml
Mark Goddard c31db5fa8a Bifrost: Stop stopping RabbitMQ
Bifrost no longer deploys RabbitMQ, so we should not try to stop it
during upgrade. In fact, if we do then it fails:

Failed to stop rabbitmq-server.service: Unit rabbitmq-server.service not
loaded.

Bifrost removed RabbitMQ in Train, so this is only required from Ussuri.

Change-Id: Ie86f85974fd7385e72a918065fc9c5172f9684ba
2020-02-21 16:40:30 +00:00

35 lines
981 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: docker exec bifrost_deploy systemctl stop {{ item }}.service
with_items:
- ironic-api
- ironic-conductor
- 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"