thegeeklab / ansible-doctor

Annotation based documentation for your Ansible roles
https://ansible-doctor.geekdocs.de
GNU General Public License v3.0
123 stars 18 forks source link

Support parsing argument_specs.yml #763

Open gionn opened 2 weeks ago

gionn commented 2 weeks ago

Since the introduction of the role arguments validation, it may happen to define an argument like:

my_role_argument:
  type: str
  description: My mandatory role argument
  required: true

which usually doesn't need a default value set in defaults/main.yml, otherwise such argument validation won't work as expected (it will always succeeded because of being defined e.g. '').

This prevent ansible-doctor to properly render those variables, unless also meta/argument_specs.yml is used to discover the available vars.

xoxys commented 1 week ago

Thanks for your feedback! Makes sense to me, would you like to work on the implementation?

gionn commented 1 week ago

I could but will be great if you provide some guidance on where to slip that in