exzeo.kubectl
Role Name
==========
Installs the kubectl command line tool on Debian/Ubuntu servers.
Description
===========
# This will download the kubectl binary directly to the specified directory. The role will automatically detect the operating system.
Role Variables
# Version of 'kubectl' to be installed.
kubectl_version: "1.21.2"
# Change this to uninstall kubectl from the server
uninstall: "false"
# Directory where the "kubectl" binary will be installed
kubectl_bin_directory: "/usr/local/bin"
Example Playbooks
Minimal Installation:
- name: Install CLI
hosts: all
roles:
- role: kubectl
Install a Specific Version:
- name: Install CLI
hosts: all
roles:
- role: kubectl
vars:
kubectl_version: "1.23.2"
Uninstall kubectl:
- name: Uninstall CLI
hosts: all
roles:
- role: kubectl
vars:
uninstall: true