Don't pull opensm or docker-registry images when disabled or destroying

This commit is contained in:
Mark Goddard 2017-08-22 13:58:31 +00:00
parent f17f82a0fc
commit e5f889baaa
2 changed files with 12 additions and 4 deletions

View File

@ -1,6 +1,10 @@
---
- name: Pulling Docker registry container image
docker_image:
name: "{{ docker_registry_image_full }}"
repository: "{{ docker_registry_image_full }}"
name: "{{ item.value.image }}"
repository: "{{ item.value.image }}"
state: present
with_dict: "{{ docker_registry_services }}"
when:
- item.value.enabled
- action != 'destroy'

View File

@ -1,6 +1,10 @@
---
- name: Pulling OpenSM container image
docker_image:
name: "{{ opensm_image_full }}"
repository: "{{ opensm_image_full }}"
name: "{{ item.value.image }}"
repository: "{{ item.value.image }}"
state: present
with_dict: "{{ opensm_services }}"
when:
- item.value.enabled
- action != 'destroy'