summaryrefslogtreecommitdiffstats
path: root/roles/etcd/tasks
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-11-20 22:23:43 -0500
committerScott Dodson <sdodson@redhat.com>2015-12-15 15:45:45 -0500
commitd3edce9c192c8d1eba572ba45ca25c06d0fbb830 (patch)
tree267da79402a804e6ce3997c1fe2d5286c1de1c37 /roles/etcd/tasks
parent043d6b3a7e3c6b799ddf4157ccdf2b2b67451d81 (diff)
downloadopenshift-d3edce9c192c8d1eba572ba45ca25c06d0fbb830.tar.gz
openshift-d3edce9c192c8d1eba572ba45ca25c06d0fbb830.tar.bz2
openshift-d3edce9c192c8d1eba572ba45ca25c06d0fbb830.tar.xz
openshift-d3edce9c192c8d1eba572ba45ca25c06d0fbb830.zip
pull docker images only if not already present
Diffstat (limited to 'roles/etcd/tasks')
-rw-r--r--roles/etcd/tasks/main.yml11
1 files changed, 8 insertions, 3 deletions
diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml
index 6906244e9..a03c693d6 100644
--- a/roles/etcd/tasks/main.yml
+++ b/roles/etcd/tasks/main.yml
@@ -11,10 +11,15 @@
action: "{{ ansible_pkg_mgr }} name=etcd-2.* state=present"
when: not openshift.common.is_containerized | bool
-- name: Pull etcd container
- command: >
- docker pull {{ openshift.etcd.etcd_image }}
+- name: Get docker images
+ command: docker images
+ changed_when: false
when: openshift.common.is_containerized | bool
+ register: docker_images
+
+- name: Pull etcd container
+ command: docker pull {{ openshift.etcd.etcd_image }}
+ when: openshift.common.is_containerized | bool and openshift.etcd.etcd_image not in docker_images.stdout
- name: Install etcd container service file
template: