/
prepull.yml
32 lines (29 loc) · 956 Bytes
/
prepull.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
- name: Check that node image is present
command: "{{ openshift_container_cli }} images -q {{ osn_image }}"
register: node_image
# This task runs async to save time while the node is being configured
- name: Pre-pull node image
docker_image:
name: "{{ osn_image }}"
environment:
NO_PROXY: "{{ openshift.common.no_proxy | default('') }}"
when: node_image.stdout_lines == []
# 10 minutes to pull the image
async: 600
poll: 0
register: image_prepull
- name: Check that pod image is present
command: "{{ openshift_container_cli }} images -q {{ osn_pod_image }}"
register: pod_image
# This task runs async to save time while other downloads proceed
- name: pre-pull pod image
docker_image:
name: "{{ osn_pod_image }}"
environment:
NO_PROXY: "{{ openshift.common.no_proxy | default('') }}"
when: pod_image.stdout_lines == []
# 10 minutes to pull the image
async: 600
poll: 0
register: pod_image_prepull