Run an AWX playbook from a web page

Hello All,
I have several playbooks that provide data on various hosts. In my case they

are Juniper MX-80 routers.

I have a plybooks that shows me a device(s) that have a particular vlan-id.
I would like to have a configuration that show the user the device(s), and allows the user to select the device (or more if there are more) and perform some action on the device after the device is selected. I have not really seen a way (yet) to do this in AWX.

So - I would like to have a web page that has a drop-down or checkbox field that shows the device or devices - allows the user to select one or all, and then when the submit button is clicked - calls and runs the awx playbook. Is this possible? OR is it possible by calling an ansible command via the command line like this: “ansible-playbook -i hosts myplaybook.yaml” any tips will be helpful

ewholz

Make a SURVEY from the playbooks, make it do what you want, since a survey can be used to perform this exact thing.

Otherwise, you would need to use a form that actions a awx-cli command to launch it.

Yes, You can very much do this . Front end is your application and Backend is AWX tower . You can create a template in AWX with your Playbook . Get the template ID . When the Submit button clicked You can call this template id with the Tower API . like ‘POST -u : http:///api/v2/job_templates//launch/’

Hello All,
thanks for this info - I will review my playbook and see what I can do
Thank You Very Much for the info

ewholz