summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2015-12-16 14:14:42 -0500
committerScott Dodson <sdodson@redhat.com>2015-12-16 14:14:42 -0500
commit48778f29f265380a3e6fa2e882621ebc3781736b (patch)
tree72f5ff520cd5d5bc3594ece643b77bcde7a712f9 /roles/openshift_node/tasks
parent5e2e55e4aa09468a054ce7c9901c51d9563cc85a (diff)
downloadopenshift-48778f29f265380a3e6fa2e882621ebc3781736b.tar.gz
openshift-48778f29f265380a3e6fa2e882621ebc3781736b.tar.bz2
openshift-48778f29f265380a3e6fa2e882621ebc3781736b.tar.xz
openshift-48778f29f265380a3e6fa2e882621ebc3781736b.zip
Add some guards to wait for images to be pulled before moving on
Diffstat (limited to 'roles/openshift_node/tasks')
-rw-r--r--roles/openshift_node/tasks/main.yml31
1 files changed, 26 insertions, 5 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 11577dd8b..96383439c 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -54,6 +54,32 @@
command: >
docker pull {{ openshift.node.node_image }}
when: openshift.common.is_containerized | bool and openshift.node.node_image not in docker_images.stdout
+
+- name: Wait for node image
+ command: >
+ docker images
+ register: docker_images
+ until: openshift.node.node_image in docker_images.stdout
+ retries: 30
+ delay: 10
+ changed_when: false
+ when: openshift.common.is_containerized | bool
+
+- name: Pull OpenVSwitch image
+ command: >
+ docker pull {{ openshift.node.ovs_image }}
+ when: openshift.common.is_containerized | bool and openshift.node.ovs_image not in docker_images.stdout
+ and openshift.common.use_openshift_sdn | bool
+
+- name: Wait for OpenVSwitch image
+ command: >
+ docker images
+ register: docker_images
+ until: openshift.node.ovs_image in docker_images.stdout
+ retries: 30
+ delay: 10
+ changed_when: false
+ when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | bool
- name: Install Node docker service file
template:
@@ -62,11 +88,6 @@
register: install_node_result
when: openshift.common.is_containerized | bool
-- name: Pull OpenvSwitch docker image
- command: >
- docker pull {{ openshift.node.ovs_image }}
- when: openshift.common.is_containerized | bool and openshift.node.ovs_image not in docker_images.stdout
-
- name: Install OpenvSwitch docker service file
template:
dest: "/etc/systemd/system/openvswitch.service"