
Instead of installing kubectl with snaps, which seem to be laky in tests, just download the oc client tools tarball and unpack it. This is how we get kubectl for the zuul images and it seems to work nicely there. Change-Id: I79590a2eeaf32722d231c2bfec35d264696b7e7a
33 lines
628 B
YAML
33 lines
628 B
YAML
- name: Install snapd
|
|
package:
|
|
name: snapd
|
|
state: absent
|
|
|
|
- name: Make /opt/oc directory
|
|
file:
|
|
path: /opt/oc
|
|
state: directory
|
|
|
|
- name: Download openshift client tarball
|
|
get_url:
|
|
url: "{{ kubectl_openshift_url }}"
|
|
checksum: "{{ kubectl_openshift_checksum }}"
|
|
dest: /opt/oc.tgz
|
|
|
|
- name: Extract openshift client tarball
|
|
unarchive:
|
|
src: /opt/oc.tgz
|
|
dest: /opt/oc
|
|
extra_opts:
|
|
- --strip-components=1
|
|
|
|
- name: Copy files into /usr/local
|
|
copy:
|
|
remote_src: true
|
|
src: "/opt/oc/{{ item }}"
|
|
dest: "/usr/local/bin/{{ item }}"
|
|
mode: 0755
|
|
loop:
|
|
- oc
|
|
- kubectl
|