Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEED] Include argument_specs.yml in roles #693

Open
skutter-de opened this issue Oct 26, 2024 · 3 comments
Open

[FEED] Include argument_specs.yml in roles #693

skutter-de opened this issue Oct 26, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request feedback General feedback help wanted Extra attention is needed role:agent This affects the agent role role:server This affects the server role

Comments

@skutter-de
Copy link

Please verify first that your feedback is not already reported here.
If possible and useful provide additional information below. This is optional however.

Provide your feedback

The roles should include arguments_specs so Ansible can do analysis to check if required parameters are set and within spec (eg. the choice between Checkmk edition)

Component Name

Component Name: roles

Ansible Version

$ ansible --version
ansible [core 2.17.5]
  config file = None
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/.local/lib/python3.12/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/user/.local/bin/ansible
  python version = 3.12.6 (main, Sep  9 2024, 00:00:00) [GCC 14.2.1 20240801 (Red Hat 14.2.1-1)] (/usr/bin/python3)
  jinja version = 3.1.4
  libyaml = True

Collection Version

$ ansible-galaxy collection list | grep checkmk
checkmk.general                          5.3.1
@skutter-de skutter-de added the feedback General feedback label Oct 26, 2024
@robin-checkmk
Copy link
Member

Hi @skutter-de and thanks for raising this!
I have been using Ansible for a number of years now, and I have never heard of a argument_specs.yml.
As this ignorance could both mean, that I missed something important or that it is something very peculiar or exotic, can you please shed some light on this for me?

I could guess from the brief description, what you mean, but I would much rather learn properly, what you are trying to achieve. So if you could elaborate on your request and maybe provide sources and or references, that would be much appreciated. Thanks!

@robin-checkmk robin-checkmk added the needs-info Further information is requested label Oct 28, 2024
@skutter-de
Copy link
Author

I also haven't heard about argument specs until about a month ago.

Ansible will automatically validate the vars set by the user against the argument spec, this can be useful for role development, since you can skip a lot of input validation because the arugment spec can handle it for you.

Another nice feature is that you can have the arugments from the spec rendered to a docs site (see here).

@robin-checkmk
Copy link
Member

Thanks for the background information and bringing this to our attention! 🙏
I am also kinda glad I did not miss anything for years. 😉

While this sounds pretty neat, I will be up-front and tell you, that I will have to put it at the bottom of my agenda. It will be there, but I cannot promise, when I will get to it. If that is alright, I will keep this issue open and report back, when I made progress.

Alternatively: We do gladly accept pull requests! So if you want to give the implementation a try yourself, feel free to do so and we will help you land the PR. 🙂

@robin-checkmk robin-checkmk added enhancement New feature or request help wanted Extra attention is needed role:server This affects the server role role:agent This affects the agent role and removed needs-info Further information is requested labels Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feedback General feedback help wanted Extra attention is needed role:agent This affects the agent role role:server This affects the server role
Projects
None yet
Development

No branches or pull requests

2 participants