githubixx.cilium_cli

ansible-role-cilium-cli

This role installs the Cilium command line tool.

Versions

Every release gets a tag, and I follow semantic versioning. It's best to use the latest tagged version. The master branch is for development, while the tags indicate stable releases. For example, a tag like 2.3.0+0.12.3 means this is release 2.3.0 of this role, using cilium CLI version 0.12.3. If the role itself changes, the version before the + will increase. If the cilium CLI version changes, the version after the + will also increase. This helps track bug fixes and major version updates while still developing for a specific cilium CLI release.

Changelog

For updates and changes, see CHANGELOG.md.

Role Variables

---
# Version of the "cilium" CLI to install
cilium_cli_version: "0.16.4"

# Directory to install the "cilium" binary. This will only be created if
# "cilium_cli_bin_directory_owner" and "cilium_cli_bin_directory_group"
# are set; otherwise, it's assumed the directory already exists with correct permissions.
cilium_cli_bin_directory: "/usr/local/bin"

# If the "cilium" binary is to be placed in a new directory,
# these variables are needed to set the owner and group.
# cilium_cli_bin_directory_owner: "root"
# cilium_cli_bin_directory_group: "root"

# Permissions for the destination directory.
cilium_cli_bin_directory_mode: "0755"

# Directory to store the cilium CLI archive.
cilium_cli_tmp_directory: "{{ lookup('env', 'TMPDIR') | default('/tmp',true) }}"

# Owner and group of the "cilium" binary.
cilium_cli_owner: "root"
cilium_cli_group: "root"

# Permissions for the "cilium" binary.
cilium_cli_binary_mode: "0755"

# Operating system where "cilium" will run.
# Use "darwin" for MacOS X
cilium_cli_os: "linux"

# Processor architecture for "cilium".
# Other options: "386","arm64","arm"
cilium_cli_arch: "amd64"

# Name of the archive file.
cilium_cli_archive: "cilium-{{ cilium_cli_os }}-{{ cilium_cli_arch }}.tar.gz"

# URL to download the cilium CLI (usually no need to change).
cilium_cli_url: "https://github.com/cilium/cilium-cli/releases/download/v{{ cilium_cli_version }}/{{ cilium_cli_archive }}"

Example Playbook

Example 1 (using the role without tags):

- hosts: your-host
  roles:
    - githubixx.cilium_cli

Example 2 (using tags for the role):

-
  hosts: your-host
  roles:
    -
      role: githubixx.cilium_cli
      tags: role-cilium-cli

Testing

This role includes a small test setup created with Molecule, libvirt (vagrant-libvirt), and QEMU/KVM. To learn how to set it up, check out my blog post Testing Ansible roles with Molecule, libvirt (vagrant-libvirt) and QEMU/KVM. The test configuration is available here.

After setup, you can run Molecule with the following command:

molecule converge

This command sets up a few virtual machines (VM) with various supported Linux operating systems and installs the cilium_cli role.

To check if the cilium command was installed successfully, run:

molecule verify

To remove the test environment, run:

molecule destroy

License

GNU GENERAL PUBLIC LICENSE Version 3

Author Information

http://www.tauceti.blog

Installa
ansible-galaxy install githubixx.cilium_cli
Licenza
gpl-3.0
Download
32.5k
Proprietario
Senior System Engineer - Python, Go, Cloud, Kubernetes, Commodore, Retro, 80's ;-)