diff --git a/ansible/roles/docker-registry/tasks/pull.yml b/ansible/roles/docker-registry/tasks/pull.yml index 6d5a6e180..afb8dbe45 100644 --- a/ansible/roles/docker-registry/tasks/pull.yml +++ b/ansible/roles/docker-registry/tasks/pull.yml @@ -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' diff --git a/ansible/roles/opensm/tasks/pull.yml b/ansible/roles/opensm/tasks/pull.yml index 8186e2492..523c8a7d7 100644 --- a/ansible/roles/opensm/tasks/pull.yml +++ b/ansible/roles/opensm/tasks/pull.yml @@ -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'