Files
kayobe/ansible/roles/opensm/tasks/deploy.yml
Mark Goddard 2693269955 Support destroying the overcloud services
'kayobe overcloud service destroy' will destroy all containers,
container images, and volumes on the overcloud hosts. All data will
be lost, so use wisely!
2017-07-11 17:49:41 +01:00

15 lines
607 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) }}"
pull: "{{ action == 'upgrade' }}"
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 }}"