summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_master')
-rw-r--r--roles/openshift_master/tasks/main.yml16
1 files changed, 10 insertions, 6 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 0c7718299..0695693ff 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -85,12 +85,16 @@
action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-master{{ openshift_version }} state=present"
when: not openshift.common.is_containerized | bool
-# TODO: enable when ansible#1993 lands and is widespread enough
-# - name: Docker image present
-# docker:
-# image: "{{ openshift.common.docker.image }}"
-# state: image_present
-# when: openshift.common.is_containerized | bool
+- name: Get docker images
+ command: docker images
+ changed_when: false
+ when: openshift.common.is_containerized | bool
+ register: docker_images
+
+- name: Pull required docker image
+ command: >
+ docker pull {{ openshift.master.master_image }}
+ when: openshift.common.is_containerized | bool and openshift.master.master_image not in docker_images.stdout
- name: Install Master docker service file
template: