kayobe/ansible/roles/opensm/tasks/deploy.yml
Mark Goddard 943a4cdb66 Fix upgrade of docker-registry and opensm containers
Previously the docker-registry container would not be upgraded when a new
image is downloaded. We now ensure that new images are tagged in the local
repository, and pull the image separately from the container upgrade.
2017-07-13 12:31:45 +01:00

14 lines
569 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 }}"
state: "{{ 'started' if item.value.enabled and action != 'destroy' | bool else 'absent' }}"
volumes: "{{ item.value.volumes }}"
with_dict: "{{ opensm_services }}"