Open kvaps opened 6 years ago
This would have to be done at SCM update time by running ansible-playbook on everything that looks to be a playbook, parsing the output, and then cross-referencing into the job templates and updating this information in the template.
It's unlikely we'd look at this in the near future, but if someone has a sample implementation it could be reviewed.
Wait, why not use ansible-playbook --list-tags
feature?
That's what you would use... but you can't do that when you open the launch or JT configuration screen because there's no guarantee that anything's checked out at that time.
@wenottingham, it's true but main reason for provide selection when run template (eg "Prompt on launch" option) Another way is collect this information once when template update and cache it somewhere for not execute it any time.
I love this idea, and from user perspective the main use-case would be during the launch of the template to aid in tag selection.
Issue with running it at the time of template creation/edit is that perhaps the data will get "stale" after edit due to project update etc. However this is no different from current behavior (and indeed is slightly better) as currently one can list arbitrary tags in free formt that is error prone.
we can have an editable field called "prompt tags" that defaults to "ansible-playbook --list-tags" which is used to offer autocomplete for job tags and skip tags.
but you can't do that when you open the launch or JT configuration screen because there's no guarantee that anything's checked out at that time.
that's why I suggest making it a human editable field, only calling "ansible-playbook --list-tags" when user clicks some refresh/populate button.
I guess it can be implemented in two phases, one is to have it human only, then make it use "--list-tags"
![Uploading Screenshot from 2019-09-19 16-28-02.png…]()
I think making it just human editable at first would be a great start. Right now th eonly solution is to add the available tags for this playbook on the template's description, which is not great because it is not shown on the LAUNCH modal and is hidden most of the time in the template's list.
Hi. I know that this issue us already pretty old and to automatically query all available tags is not that easy, because when launching job the right SCM branch might not even be checked out. But would it be so hard to allow user to pre-define a list of choosable tags as a property of job template? When running one could create new tags as it is today, and choose from those defined in job template before... This would cover most of the problems here and is not that complex to implement...
+1 for this, either way, awx to collect tags or we define it manually per template
+1, truly a very desired and handy feature when launching templates
+1, this is indeed a feature that would be very useful when using tags in playbooks
++ yes this would be super useful. The user currently needs access to the scm to determine which tags are available
+1, this feature would be really useful for us too as we let dev teams use AWX and do not want them to write wrong tags
+1 as well. It's so easy to make a typo and waste time troubleshooting...
ISSUE TYPE
COMPONENT NAME
SUMMARY
We need to query playbook for provide list of tags selection for execution. Most actual when using "Prompt on launch" option.
ENVIRONMENT
ADDITIONAL INFORMATION