Role to download and install Kompose the tool for converting Docker Compose files to Kubernetes resources.
-
Ansible Core >= 2.12
-
Linux Distribution
-
Debian Family
-
Debian
- Buster (10)
- Bullseye (11)
-
Ubuntu
- Bionic (18.04)
- Focal (20.04)
-
-
RedHat Family
-
Rocky Linux
- 8
-
-
Note: other versions are likely to work but have not been tested.
-
The following variables will change the behavior of this role (default values are shown below):
# Kompose version number
kompose_version: '1.29.0'
# SHA256 sum for the redistributable Kompose package (i.e. kompose-linux-amd64.tar.gz)
kompose_redis_sha256sum: '1167e6cc3c3aac346616f6b0232739ae438ea6a1e0aeae0b938831f96298eb55'
# Mirror to download the Kompose from
kompose_mirror: 'https://github.com/kubernetes/kompose/releases/download/v{{ kompose_version }}'
# Directory to store files downloaded for Kompose
kompose_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}"
- hosts: servers
roles:
- role: gantsign.kompose
We recommend using the gantsign.antigen role to enable tab completion for Kompose (this must be configured for each user).
- hosts: servers
roles:
- role: gantsign.kompose
- role: gantsign.antigen
users:
- username: example
antigen_bundles:
- name: kompose
url: gantsign/zsh-plugins
location: kompose
If you prefer to use Antigen directly add the following to your Antigen configuration:
antigen bundle gantsign/zsh-plugins kompose
To manually configure Zsh add the following to your .zshrc
:
eval "$(kompose completion zsh)"
You can find more roles from GantSign on Ansible Galaxy.
This project uses the following tooling:
- Molecule for orchestrating test scenarios
- Testinfra for testing the changes on the remote
- pytest the testing framework
- Tox manages Python virtual environments for linting and testing
- pip-tools for managing dependencies
A Visual Studio Code Dev Container is provided for developing and testing this role.
MIT
John Freeman
GantSign Ltd. Company No. 06109112 (registered in England)