The AWX Project (AWX) is an open source community project. In addition, it’s the OpenSource version of the Ansible Tower software sponsored by Red Hat, that enables users to better control their Ansible project use in IT environments.
In this tutorial, we will show you how to use Survey to pass variables in user-friendly way, without the need to pass them from EXTRA VARIABLES box.
To begin, we are going to create a new ansible playbook to install httpd and copy the
index.html file, with a required variable called
apache_custom_message as a custom welcome message for our new website.
01- Download the playbook from the following Github link. to your project folder under the directory
02- Create a new job template for your project, here is our job template configuration :
03- After saving the job template, click
ADD SURVEY button and fill all the details as below:
-In our example we used a required prompt survey, a Text for the
Answer Type field with no minimum and default maximum length and a
Default Answer when the answer is not provided by the user.
04- To save the survey prompt, just click the
+ADD button and finaly the
SAVE again on the main Job Template page.
06- Launch the job template. When prompted, enter your desired custom message and click
07- Once you have lunched the job template, you will be redirected to a job screen which is refreshing in realtime showing you the status of the job.
08- Once your job is successful, navigate to your website using the ip address of the host and you should see something like this, but with your own custom message.
In this tutorial, we have shown you how to use a Survey to set extra variables for the playbook in AWX Ansible Tower. For more information, you can now visit the official Ansible Tower Documentation page.