diff --git a/etc/kayobe/ansible/stop-openstack-services.yml b/etc/kayobe/ansible/stop-openstack-services.yml new file mode 100644 index 000000000..08f4e964a --- /dev/null +++ b/etc/kayobe/ansible/stop-openstack-services.yml @@ -0,0 +1,29 @@ +--- +# Stops containers running OpenStack services + +- name: Stop OpenStack services + hosts: overcloud + become: true + gather_facts: false + vars: + - stop_service_list: + - "blazar" + - "barbican" + - "cinder" + - "cloudkitty" + - "designate" + - "glance" + - "heat" + - "horizon" + - "ironic" + - "keystone" + - "magnum" + - "manila" + - "neutron" + - "nova" + - "octavia" + - "placement" + tasks: + - name: Stop OpenStack services + shell: >- + docker ps -a | egrep '({{ stop_service_list | join('|') }})' | awk '{ print $NF }' | xargs docker stop diff --git a/releasenotes/notes/stop-services-playbook-b85b53d1a7571009.yaml b/releasenotes/notes/stop-services-playbook-b85b53d1a7571009.yaml new file mode 100644 index 000000000..6516f8ec4 --- /dev/null +++ b/releasenotes/notes/stop-services-playbook-b85b53d1a7571009.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Added the ``stop-openstack-services.yml`` playbook, which can be used to + stop OpenStack services across the overcloud.