This role installs kubectl binary in all UNIX systems
Ansible 2.2 or higher
Create or add to your roles dependency file (e.g requirements.yml):
- src: torrentalle.kubectl
Install the role with ansible-galaxy command:
ansible-galaxy install -p roles -r requirements.yml -f
- hosts: bastion
roles:
- { role: kubectl }
Available variables are listed below, along with default values (see defaults/main.yml
):
kubectl_release: 'latest'
kubectl_install_path: /usr/local/bin
You can change the installation sources modifying following variables (see vars/main.yml
):
kubectl_latest_info_url: https://storage.googleapis.com/kubernetes-release/release/stable.txt
kubectl_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kubectl_release }}/bin/{{ ansible_system | lower }}/amd64/kubectl"
kubectl_sha1_url: "{{ kubectl_download_url }}.sha1"
Tox, Docker, Molecule and Goss are used tot test this role. You must install docker and tox before launch tests
sudo apt install docker-ce
sudo pip install tox
Run tests launching tox
command
tox
BSD