I’m trying to simplify a DNS sinkhole configuration with Ansible. Ultimately what I’d like is a file full of domains (potentially hundreds). I’d then like a template that has one line that iterates through the list of domains build a config file. The config file is essentially multiple similar lines where the only thing that changes is the domain. I’m not quite sure how to get Ansible/Jinja to do this for me though. Thoughts?
something like:
vars:
sinkhole:
- host1
- fqdn2.exmaple.com
....
- template: src=sinkhole.j2 ....