Need to add argument specs for all roles #509
Replies: 3 comments 5 replies
-
I've made a start on this. Will continue this afternoon and put a PR in |
Beta Was this translation helpful? Give feedback.
-
@sean-m-sullivan I'm realising now there's a problem with how I'm doing all this... I'll try to explain as best I can: So I'm trying to do it all properly with describing all sub options of the variables (e.g. with ah_hoc_command_cancel below):
The problem here is that if you try to use the role with additional keys on any element of This is apparent in the CI where we are getting a failure because we are collecting information from a previous task and using that to cancel the ad_hoc command. That's a pretty normal workflow I would say, so I think we need to allow throughout the usage of additional keys which are arbitrary in sub-options. As far as I can see there is no way to allow this though so I may have to revert to the below:
and not describe any sub-options which I think is a shame as it would have been a great way to be documented as code. So they options here are the following:
I'll pause working on this for now until we get further. Oh how I wish I knew this would have been an issue before I spent so long transcribing all these options |
Beta Was this translation helpful? Give feedback.
-
Not to add on things to your workfload Tom, I meant to get to this, but this arg spec is accross ALL of the collections, all 4, just for note, Its just we have discussion for the collection group in this repo. |
Beta Was this translation helpful? Give feedback.
-
As in discussion for ansible inclusion, we need to add meta/argument_spec.yml to all roles
Detailed here
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.html#role-argument-validation
discussion here:
ansible-community/community-topics#197 (comment)
Beta Was this translation helpful? Give feedback.
All reactions