diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2017-10-23 10:47:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-23 10:47:35 -0700 |
commit | be7d536260d562e3fff6d6ebf762f6bc2e4e9879 (patch) | |
tree | c9e2128bdc3148c4d2dcc0d78b28a2c6d2f7f3c6 /roles/openshift_cli | |
parent | a20098d3ae28110dd4d38ed4aa3a89af6cb72a01 (diff) | |
parent | f7b290de4186f00dd51e41dfb7e9f5eb42174099 (diff) | |
download | openshift-be7d536260d562e3fff6d6ebf762f6bc2e4e9879.tar.gz openshift-be7d536260d562e3fff6d6ebf762f6bc2e4e9879.tar.bz2 openshift-be7d536260d562e3fff6d6ebf762f6bc2e4e9879.tar.xz openshift-be7d536260d562e3fff6d6ebf762f6bc2e4e9879.zip |
Merge pull request #5453 from giuseppe/use-docker-cli-image-if-already-available
Automatic merge from submit-queue.
cli: do not pull again the image when using Docker
When CRI-O is used and the CLI image is already pulled into Docker
then use it also for copying the CLI files to the host instead of
pulling it once again in the ostree storage.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'roles/openshift_cli')
-rw-r--r-- | roles/openshift_cli/tasks/main.yml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/roles/openshift_cli/tasks/main.yml b/roles/openshift_cli/tasks/main.yml index 9e61805f9..14d8a3325 100644 --- a/roles/openshift_cli/tasks/main.yml +++ b/roles/openshift_cli/tasks/main.yml @@ -1,6 +1,9 @@ --- - set_fact: - l_use_crio: "{{ openshift_use_crio | default(false) }}" + l_use_crio_only: "{{ openshift_use_crio_only | default(false) }}" + l_is_system_container_image: "{{ openshift_use_master_system_container | default(openshift_use_system_containers | default(false)) | bool }}" +- set_fact: + l_use_cli_atomic_image: "{{ l_use_crio_only or l_is_system_container_image }}" - name: Install clients package: name={{ openshift.common.service_type }}-clients state=present @@ -20,23 +23,23 @@ backend: "docker" when: - openshift.common.is_containerized | bool - - not l_use_crio + - not l_use_cli_atomic_image | bool - block: - name: Pull CLI Image command: > - atomic pull --storage ostree {{ openshift.common.system_images_registry }}/{{ openshift.common.cli_image }}:{{ openshift_image_tag }} + atomic pull --storage ostree {{ 'docker:' if openshift.common.system_images_registry == 'docker' else 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.system_images_registry }}/{{ openshift.common.cli_image }}" + image: "{{ '' if openshift.common.system_images_registry == 'docker' else openshift.common.system_images_registry + '/' }}{{ openshift.common.cli_image }}" tag: "{{ openshift_image_tag }}" backend: "atomic" when: - openshift.common.is_containerized | bool - - l_use_crio + - l_use_cli_atomic_image | bool - name: Reload facts to pick up installed OpenShift version openshift_facts: |