summaryrefslogtreecommitdiffstats
path: root/roles/openshift_cli/tasks
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-08-04 18:32:23 -0400
committerGitHub <noreply@github.com>2017-08-04 18:32:23 -0400
commit3db2bb10c0ad5e7ed702bfccdec03562533e8539 (patch)
tree27e9493d9e5ed24ec1847678b76e02e10d61ce77 /roles/openshift_cli/tasks
parent145c90c9eb58ae9ce25e7795fcf403a2595d3580 (diff)
parent31e708a5d440a6ad13f81c4b94ad26e0b2d9587a (diff)
downloadopenshift-3db2bb10c0ad5e7ed702bfccdec03562533e8539.tar.gz
openshift-3db2bb10c0ad5e7ed702bfccdec03562533e8539.tar.bz2
openshift-3db2bb10c0ad5e7ed702bfccdec03562533e8539.tar.xz
openshift-3db2bb10c0ad5e7ed702bfccdec03562533e8539.zip
Merge pull request #4898 from giuseppe/cri-o
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_cli/tasks')
-rw-r--r--roles/openshift_cli/tasks/main.yml44
1 files changed, 33 insertions, 11 deletions
diff --git a/roles/openshift_cli/tasks/main.yml b/roles/openshift_cli/tasks/main.yml
index 07a00189c..c716a0860 100644
--- a/roles/openshift_cli/tasks/main.yml
+++ b/roles/openshift_cli/tasks/main.yml
@@ -1,20 +1,42 @@
---
+- set_fact:
+ l_use_crio: "{{ openshift_docker_use_crio | default(false) }}"
+
- name: Install clients
package: name={{ openshift.common.service_type }}-clients state=present
when: not openshift.common.is_containerized | bool
-- name: Pull CLI Image
- command: >
- docker pull {{ openshift.common.cli_image }}:{{ openshift_image_tag }}
- register: pull_result
- changed_when: "'Downloaded newer image' in pull_result.stdout"
- when: openshift.common.is_containerized | bool
+- block:
+ - name: Pull CLI Image
+ command: >
+ docker pull {{ openshift.common.cli_image }}:{{ openshift_image_tag }}
+ register: pull_result
+ changed_when: "'Downloaded newer image' in pull_result.stdout"
+
+ - name: Copy client binaries/symlinks out of CLI image for use on the host
+ openshift_container_binary_sync:
+ image: "{{ openshift.common.cli_image }}"
+ tag: "{{ openshift_image_tag }}"
+ backend: "docker"
+ when:
+ - openshift.common.is_containerized | bool
+ - not l_use_crio
+
+- block:
+ - name: Pull CLI Image
+ command: >
+ atomic pull --storage ostree {{ openshift.common.system_images_registry }}/{{ openshift.common.cli_image }}:{{ openshift_image_tag }}
+ register: pull_result
+ changed_when: "'Pulling layer' in pull_result.stdout"
-- name: Copy client binaries/symlinks out of CLI image for use on the host
- openshift_container_binary_sync:
- image: "{{ openshift.common.cli_image }}"
- tag: "{{ openshift_image_tag }}"
- when: openshift.common.is_containerized | bool
+ - name: Copy client binaries/symlinks out of CLI image for use on the host
+ openshift_container_binary_sync:
+ image: "{{ openshift.common.system_images_registry }}/{{ openshift.common.cli_image }}"
+ tag: "{{ openshift_image_tag }}"
+ backend: "atomic"
+ when:
+ - openshift.common.is_containerized | bool
+ - l_use_crio
- name: Reload facts to pick up installed OpenShift version
openshift_facts: