ansible-infra/ansible_collections/nullified/infrastructure/roles/kubectl
2025-03-11 00:00:00 +00:00
..
defaults chore!: separated galaxy deps and own collections; modified ansible script generation to use two paths for collections 2025-02-23 00:00:00 +00:00
handlers chore!: separated galaxy deps and own collections; modified ansible script generation to use two paths for collections 2025-02-23 00:00:00 +00:00
meta chore!: separated galaxy deps and own collections; modified ansible script generation to use two paths for collections 2025-02-23 00:00:00 +00:00
tasks fix(molecule): working again, added test for provisioner load_vars 2025-03-11 00:00:00 +00:00
tests chore!: separated galaxy deps and own collections; modified ansible script generation to use two paths for collections 2025-02-23 00:00:00 +00:00
vars chore!: separated galaxy deps and own collections; modified ansible script generation to use two paths for collections 2025-02-23 00:00:00 +00:00
README.md chore!: separated galaxy deps and own collections; modified ansible script generation to use two paths for collections 2025-02-23 00:00:00 +00:00

Kubectl

This role handles the installation of the kubectl binary and optionally supports version pining or unconditional upgrade.

Requirements

Only tested and used on Debian (uses the ansible.builtin.apt module).

Role Variables

kubectl_binary_path

Path where the kubectl binary is installed (no discovery is performed so pre-existing binaries will remain untouched).

Default value: kubectl_binary_path: /usr/local/bin/kubectl

kubectl_install_version

Version of kubectl to install. It allows multiple values:

  • empty: will install the binary if not already present, else nothing is changed,
  • 'vX.Y.Z': will install the specified version (e.g. v3.15.2), upgrading / downgrading the local binary if required,
  • latest: will install the latest available version unless the local binary is already up-to-date.

Default value: kubectl_install_version: latest

License

MIT