githubixx / ansible-role-cilium-cli

Ansible role to install cilium command line (CLI) utility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autodiscover arch

onedr0p opened this issue Β· comments

Hi πŸ‘‹πŸΌ

I was looking to use your role however it would be nice if it could also auto discover the architecture of the machine it is running on.

Maybe an option of:

cilium_cli_arch: "auto"

Thanks!

Hello. Well that feature would be nice but there is no match between Ansible and the architecture that is part of the package name. E.g. Ansible provides only this variables that could be used:

    "ansible_architecture": "x86_64",
    "ansible_machine": "x86_64",
    "ansible_userspace_architecture": "x86_64",

But the package name contains amd64 e.g. So a mapping would be needed and I don't have that information for all architectures.

Yeah, that can get a bit tedious to try and match up ansible_architecture to the release filenames. FWIW I have at least the most popular architectures (amd64 and arm64) done this way since I only support amd64 and arm64 on this project:

https://github.com/onedr0p/flux-cluster-template/blob/3116a104294952336c79f609843d8883a2a5845d/ansible/playbooks/cluster-prepare.yml#L52

I'll go ahead and close this issue as the above link works fine for my usecase.