kayobe/ansible/roles/opensm/tasks/deploy.yml
stack 20e3b75547 In latest Docker 17.05 restart-retires and unless-stopped are
mutually exclusive. Remove restart-retries where used.
2017-10-23 11:13:48 +01:00

14 lines
584 B
YAML

---
- name: Ensure OpenSM container is running
docker_container:
image: "{{ item.value.image }}"
name: "{{ item.value.container_name }}"
network_mode: "host"
privileged: "{{ item.value.privileged | default(omit) }}"
read_only: "{{ item.value.read_only | default(omit) }}"
restart_policy: "{{ opensm_restart_policy }}"
restart_retries: "{{ opensm_restart_retries | default(omit) }}"
state: "{{ (item.value.enabled and action != 'destroy') | ternary('started', 'absent') }}"
volumes: "{{ item.value.volumes }}"
with_dict: "{{ opensm_services }}"