ansible-infra/collections/ansible_collections/nullified/infrastructure/roles/kubectl
2024-07-07 00:00:00 +00:00
..
defaults feat(role): add kubectl role 2024-07-07 00:00:00 +00:00
handlers feat(role): add kubectl role 2024-07-07 00:00:00 +00:00
meta feat(role): add kubectl role 2024-07-07 00:00:00 +00:00
tasks feat(role): add kubectl role 2024-07-07 00:00:00 +00:00
tests feat(role): add kubectl role 2024-07-07 00:00:00 +00:00
vars feat(role): add kubectl role 2024-07-07 00:00:00 +00:00
README.md feat(role): add kubectl role 2024-07-07 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