gantsign.kops
Ansible Role: kops
This role helps you download and install kops, a tool for setting up production-ready Kubernetes clusters.
Requirements
Ansible version ≥ 2.8
Supported Linux Distributions:
Debian Family:
- Debian:
- Jessie (8)
- Stretch (9)
- Ubuntu:
- Xenial (16.04)
- Bionic (18.04)
- Debian:
RedHat Family:
- CentOS:
- 7
- CentOS:
Note: Other versions may work, but are not tested.
Role Variables
You can customize this role using the following variables (default values included):
# kops version number
kops_version: 'v1.18.2'
# Source to download kops
kops_mirror: 'https://github.com/kubernetes/kops/releases/download/{{ kops_version }}'
# Directory to store downloaded kops files
kops_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}"
Example Playbook
- hosts: servers
roles:
- role: gantsign.kops
Tab Completion for Zsh
Using Ansible
We suggest using the gantsign.antigen role to set up tab completion for kops (this needs to be set up for every user).
- hosts: servers
roles:
- role: gantsign.kops
- role: gantsign.antigen
users:
- username: example
antigen_libraries:
- name: oh-my-zsh
antigen_bundles:
- name: kops
Using Antigen
If you want to use Antigen directly, add this to your Antigen config:
antigen bundle kops
Manual Configuration
To set up Zsh manually, add this to your .zshrc
file:
eval "$(kops completion zsh)"
More Roles From GantSign
You can find more roles from GantSign on Ansible Galaxy.
Development & Testing
This project uses Molecule for development and testing. The role is unit tested with Testinfra and pytest.
To develop or test this role, you'll need the following installed:
To make installations easier, this project has a Molecule Wrapper that installs Molecule and its dependencies (excluding Linux) and then runs Molecule with your command.
To test this role with Molecule Wrapper, run this command from the project root:
./moleculew test
Note: Some dependencies require sudo
permission to install.
License
MIT
Author Information
John Freeman
GantSign Ltd.
Company No. 06109112 (registered in England)
Ansible role for downloading and installing the kops tool for Kubernetes.
ansible-galaxy install gantsign.kops