infra/roles/airconnect/handlers/main.yml

15 lines
476 B
YAML

---
- name: restart airconnect containers
docker_container:
name: airconnect-{{ item.prog }}
state: "{{ item.state }}"
restart: "{% if item.state|default('started') == 'started' %}true{% else %}false{% endif %}"
loop_control:
label: "{{ item.prog }}"
with_items: "{{ airconnect_containers }}"
when:
- airconnect_containers_task.changed|default(false)
- item.state|default("started") == "started"
- airconnect_restart_handler|default(true)