|
42 | 42 | bastion_rhel_version == 'rhel8') | |
43 | 43 | ternary('openshift-client-linux-amd64-' + bastion_rhel_version, 'openshift-client-linux') }} |
44 | 44 |
|
45 | | -- name: Get OpenShift tools when payload_url is not set |
46 | | - get_url: |
47 | | - url: "{{ release_urls[ocp_build] }}/{{ocp_release_version}}/{{ installer_oc_installer_prefix }}-{{ ocp_release_version }}.tar.gz" |
48 | | - dest: "{{ ocp_version_path }}" |
49 | | - mode: 0700 |
50 | | - register: client_chk |
51 | | - retries: 3 |
52 | | - delay: 5 |
53 | | - until: client_chk is not failed |
| 45 | +- name: Non-Prow - Get and Unpack OpenShift clients |
54 | 46 | when: payload_url == '' |
| 47 | + block: |
55 | 48 |
|
56 | | -- name: Unarchive the clients |
57 | | - unarchive: |
58 | | - src: "{{ ocp_version_path }}/{{ installer_oc_installer_prefix }}-{{ ocp_release_version }}.tar.gz" |
59 | | - dest: "{{ ocp_version_path }}" |
60 | | - remote_src: yes |
| 49 | + - name: Get OpenShift tools when payload_url is not set |
| 50 | + get_url: |
| 51 | + url: "{{ release_urls[ocp_build] }}/{{ocp_release_version}}/{{ installer_oc_installer_prefix }}-{{ ocp_release_version }}.tar.gz" |
| 52 | + dest: "{{ ocp_version_path }}" |
| 53 | + mode: 0700 |
| 54 | + register: client_chk |
| 55 | + retries: 3 |
| 56 | + delay: 5 |
| 57 | + until: client_chk is not failed |
61 | 58 |
|
62 | | -- name: Copy correctly versioned oc/kubectl clients into a pathed directory |
63 | | - copy: |
64 | | - src: "{{ item.src }}" |
65 | | - dest: "{{ item.dest }}" |
66 | | - remote_src: true |
67 | | - mode: 0700 |
68 | | - loop: |
69 | | - - src: "{{ ocp_version_path }}/oc" |
70 | | - dest: /usr/local/bin/oc |
71 | | - - src: "{{ ocp_version_path }}/kubectl" |
72 | | - dest: /usr/local/bin/kubectl |
73 | | - when: setup_bastion | default(true) |
| 59 | + - name: Unarchive clients - payload_url not set |
| 60 | + include_tasks: unarchive_clients.yml |
74 | 61 |
|
75 | 62 | - name: Extract/Download the openshift-install binary for the specific release |
76 | 63 | shell: | |
|
79 | 66 | args: |
80 | 67 | chdir: "{{ ocp_version_path }}" |
81 | 68 |
|
| 69 | +# We need to unarchive the clients here to align their versions cluster version |
| 70 | + |
| 71 | +- name: Prow - Unarchive clients - payload_url set |
| 72 | + include_tasks: unarchive_clients.yml |
| 73 | + when: payload_url != '' |
| 74 | + |
82 | 75 | # Prevents errors when attempting to get the display/release name/version and the cluster |
83 | 76 | # auth-ed by the config is inaccessible |
84 | 77 | - name: Remove existing /root/.kube/config |
|
0 commit comments