ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.9k stars 3.4k forks source link

Feature: Provide list of tags for playbook #1182

Open kvaps opened 6 years ago

kvaps commented 6 years ago
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

screenshot-2018-2-9 ansible awx set maintenance

wenottingham commented 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.

kvaps commented 6 years ago

Wait, why not use ansible-playbook --list-tags feature?

wenottingham commented 6 years ago

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.

kvaps commented 6 years ago

@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.

droopy4096 commented 5 years ago

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.

muayyad-alsadi commented 5 years ago

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…]()

tikoflano commented 4 years ago

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.

bartowl commented 1 year ago

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...

itsbicb4 commented 7 months ago

+1 for this, either way, awx to collect tags or we define it manually per template

pwakano commented 6 months ago

+1, truly a very desired and handy feature when launching templates

Triple-C-BE commented 5 months ago

+1, this is indeed a feature that would be very useful when using tags in playbooks

rkearsley commented 2 weeks ago

++ yes this would be super useful. The user currently needs access to the scm to determine which tags are available

MikelH911 commented 1 week ago

+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

Matz13 commented 2 days ago

+1 as well. It's so easy to make a typo and waste time troubleshooting...