diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-07-26 17:59:44 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-08-03 17:20:52 +0200 |
commit | 2ea7c0d02d7bc10b3bb6313b13c3bbf37ca4a67c (patch) | |
tree | 74a937f22f767a97dfec4023f2e0534b4f7f6500 /roles/openshift_cli/tasks | |
parent | 398d5963d57a2022f18c4ded2b85619accb34b1e (diff) | |
download | openshift-2ea7c0d02d7bc10b3bb6313b13c3bbf37ca4a67c.tar.gz openshift-2ea7c0d02d7bc10b3bb6313b13c3bbf37ca4a67c.tar.bz2 openshift-2ea7c0d02d7bc10b3bb6313b13c3bbf37ca4a67c.tar.xz openshift-2ea7c0d02d7bc10b3bb6313b13c3bbf37ca4a67c.zip |
cli_image: do not require Docker when using CRI-O
Use atomic to copy the CLI binaries to the host.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'roles/openshift_cli/tasks')
-rw-r--r-- | roles/openshift_cli/tasks/main.yml | 44 |
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: |