ansible-role-openstack-oper.../tasks/restart_service.yml

19 lines
564 B
YAML

- name: Gather container list
service_map_facts:
services: "{{ operations_services_to_restart }}"
service_map: "{{ operations_service_map | combine(operations_custom_service_map) }}"
- name: Restart containerized OpenStack services
docker_container:
name: "{{ item['container_name'] }}"
state: started
restart: yes
loop: "{{ docker_containers_to_restart }}"
- name: Restart OpenStack services
service:
name: "{{ item['name'] }}"
state: restarted
loop: "{{ systemd_services_to_restart }}"
when: item['state'] == "enabled"