summaryrefslogtreecommitdiffstats
path: root/roles/openshift_cli
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_cli')
-rw-r--r--roles/openshift_cli/tasks/main.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/openshift_cli/tasks/main.yml b/roles/openshift_cli/tasks/main.yml
index c0ea66e70..8d7686ffd 100644
--- a/roles/openshift_cli/tasks/main.yml
+++ b/roles/openshift_cli/tasks/main.yml
@@ -8,10 +8,26 @@
yum: pkg={{ openshift.common.service_type }}-clients state=installed
when: not openshift.common.is_containerized | bool
+- name: List Docker images
+ command: >
+ docker images
+ register: docker_images
+
- name: Pull CLI Image
command: >
docker pull {{ openshift.common.cli_image }}
+ when: openshift.common.is_containerized | bool and openshift.common.cli_image not in docker_images.stdout
+
+- name: Wait for CLI image
+ command: >
+ docker images
+ register: docker_images
+ until: openshift.common.cli_image in docker_images.stdout
+ retries: 30
+ delay: 10
+ changed_when: false
when: openshift.common.is_containerized | bool
+
- name: Create /usr/local/bin/openshift cli wrapper
template: