system-config/playbooks/roles/install-kubectl/tasks/main.yaml

17 lines
423 B
YAML

- name: Install snapd
package:
name: snapd
state: present
- name: Install kubectl
command: snap install kubectl --classic
# /snap/bin is often in the path, but not in a non-login shell, which
# makes it difficult to use via ansible. Add an extra symlink so we
# can always find it.
- name: Symlink snapd into /usr/local/bin
file:
src: /snap/bin/kubectl
dest: /usr/local/bin/kubectl
state: link