After completing this section, you should be able to use a Survey in Red Hat Ansible Tower to interactively set extra variables that are used by your playbook.
Actions with required data that is not available in advance are challenging to automate. This is true even when automating simple network operations.
Many network related operations exist that involve data that might not be available in advance. For example:
Adding a static host entry
Adding a group object, network object, or host object
Adding an address to an ACL or FW rule
Adding a destination address to lists of blocked malware sites
Tracing the path traversed by packets between two points
Using ICMP to test reachability between two points
Changing the destination to which logged events are forwarded
We would like a way to provide data at the start of an automated process.
You have already seen how Red Hat Ansible Engine lets you pass additional data to the ansible and ansible-playbook commands by way of the --extra-vars option (-e).
Red Hat Ansible Tower has two more ways to provide additional data at the start of an automated process: Prompt for Extra Variables and Surveys.
Prompt for Extra Variables does exactly what it says: it prompts for extra variables.
Surveys set extra variables in a user-friendly question and answer way. Surveys also allow for validation of user input.
Surveys are defined in conjunction with Job Templates.
Two types of Job Templates support Surveys: Run and Check.