I recently had a customer ask about how you could present a user with a form they fill out, then that info would be used to complete a template for say a webserver; the simple answer is to use the survey feature in Tower(also sometimes called control in the Ansible Automation Platform).
Demo Video
Resources:
First, my playbook and template can be found here.
The template file is pretty straight forward:
There’s three variables serv_name, option1, and option2 that will be replaced at runtime with the results of the survey.
The playbook is equally simple:
There is really only a single task that really does anything and it is the template task. It calls the survey-template.conf.j2 file, does variable replacement, and then sticks it in the file_loc path.
The remaining two tasks read the file into a variable, then display it. In a real scenario the template file would push the configuration to a server, then perform a restart of the service in question.
Tower/Control:
From the templates section I create a new job template with info to my inventory, credentials, project, and playbook:

Next I click the “add survey” button:

Last I create three entries, each corresponding to a different variable. The survey info is passed at runtime as extra variables.

Now the template can be launched and the info filled out:

I can now see the output of the run in all its glory:

Conclusion:
I hope you can see how info can be gathered via a survey and easily injected into your playbooks to perform any kind of automation you can dream up.
Thanks and happy surveying.
This week we have Greg, Mike, and Tommy C doing a lot of discussion…which I like.
**Sponsors**
Sonar.software
Kwikbit.com
Towercoverage.com
**/Sponsors**
This week we talk about:
Prevent rogue DHCP servers
unforgivable bad wisp habits
April Fools Clearing
Starlink no plans for tiered consumer plans
DFS
Towers By Airports
Thrift created a new channel called stonks, and I couldn’t care less, but the name makes me LOL
Ubiquiti breach – again (same breach, more info)
Here’s the video:(if you don’t see it, hit refresh)
This week we have Greg, Mike, and Tommy C doing a lot of discussion…which I like.
**Sponsors**
Sonar.software
Kwikbit.com
Towercoverage.com
**/Sponsors**
This week we talk about:
Prevent rogue DHCP servers
unforgivable bad wisp habits
April Fools Clearing
Starlink no plans for tiered consumer plans
DFS
Towers By Airports
Thrift created a new channel called stonks, and I couldn’t care less, but the name makes me LOL
Ubiquiti breach – again (same breach, more info)
Here’s the video:(if you don’t see it, hit refresh)
This week we have Greg, Mike, Nick, and the best hair in the business Andrew Thrift(AKA Little Alex Horne). Big thanks to Tommy C for taking one for the team!
**Sponsors**
Sonar.software
Kwikbit.com
Towercoverage.com
**/Sponsors**
This week we talk about:
CRS504/CRS518 and CCR2016/CCR2116 …speculations?
Thrifty thoughts on security
automation in security
IBM QRadar has a community edition appliance
I’m going to use PFSense as my workshop firewall
How internet congestion control works – bufferbloat
Midwest-IX Router Upgrade
QSFP28-100G DWDM
Here’s the video:(if you don’t see it, hit refresh)
This week we have Greg, Mike, Nick, and the best hair in the business Andrew Thrift(AKA Little Alex Horne). Big thanks to Tommy C for taking one for the team!
**Sponsors**
Sonar.software
Kwikbit.com
Towercoverage.com
**/Sponsors**
This week we talk about:
CRS504/CRS518 and CCR2016/CCR2116 …speculations?
Thrifty thoughts on security
automation in security
IBM QRadar has a community edition appliance
I’m going to use PFSense as my workshop firewall
How internet congestion control works – bufferbloat
Midwest-IX Router Upgrade
QSFP28-100G DWDM
Here’s the video:(if you don’t see it, hit refresh)
This week we have Greg, Mike, and Tommy C. Apologies in advance, I’ve not been feeling too well and the last 30 minutes or so I kinda crashed(so big thanks to T-Cent and Mike for carrying me).
**Sponsors**
Sonar.software
Kwikbit.com
Towercoverage.com
**/Sponsors**
This week we talk about:
Greg’s conversation podcast with random interesting people
Tommy’s CCR2004 V7.1 adventures
MTK CRS317 to CRS328 failure
Mikrotik newsletter 99
100G-FR?
CHR License
Core, Border, Route Reflector, etc.
Mike vs Ransomware
Here’s the video:(if you don’t see it, hit refresh)
This week we have Greg, Mike, and Tommy C. Apologies in advance, I’ve not been feeling too well and the last 30 minutes or so I kinda crashed(so big thanks to T-Cent and Mike for carrying me).
**Sponsors**
Sonar.software
Kwikbit.com
Towercoverage.com
**/Sponsors**
This week we talk about:
Greg’s conversation podcast with random interesting people
Tommy’s CCR2004 V7.1 adventures
MTK CRS317 to CRS328 failure
Mikrotik newsletter 99
100G-FR?
CHR License
Core, Border, Route Reflector, etc.
Mike vs Ransomware
Here’s the video:(if you don’t see it, hit refresh)



