Ansible role for installating kubectl CLI
Only test with ansible 2.5 min version
Available variables are listed below, along with default values (see defaults/main.yml):
# By default, module will download last version
# To specify a version, use this below param
# kubectl_install_version: vX.X.X
# URL to retrieve last stable kubectl release version
kubectl_last_version_info_url: https://storage.googleapis.com/kubernetes-release/release/stable.txt
# Directory where executable will be downloaded before installation
kubectl_download_location: /tmp/
# Url to packer zip
kubectl_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kubectl_install_version }}/bin/linux/amd64/kubectl"
# Downloaded file name
kubectl_downloaded_file_name: kubectl
# Path where to install terraform
kubectl_execution_path: /usr/local/bin
# Execution file name for terraform
kubectl_execution_file_name: kubectl
No dependencie
- hosts: all
roles:
- role: ptavares.ansible_role_kubectl
Inside vars/main.yml
:
- Copy content of defaults/main.yml in your playbook's vars file if needed.
- Customize it as you like (filling role's variables)
MIT