We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c00268 commit 19a3fb2Copy full SHA for 19a3fb2
ansible/roles/ocp-release/tasks/payload_url.yml
@@ -21,8 +21,14 @@
21
bastion_rhel_version: "rhel8"
22
when: ansible_facts['distribution_major_version'] is version('8', '==')
23
24
+- name: Check if oc exists
25
+ stat:
26
+ path: /usr/local/bin/oc
27
+ register: oc_exists
28
+
29
- name: Get latest stable Openshift client
30
shell: curl -L https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux-amd64-{{ bastion_rhel_version}}.tar.gz | tar xz -C /usr/local/bin/ oc
31
+ when: not oc_exists.stat.exists
32
33
- name: Get release info
34
command: oc adm release info {{ payload_url }}
0 commit comments