Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dnsmasq:
- zones:
- domain_com:
- hosts:
- 1.1.1.1: host1
- 1.1.1.2: host2
- 1.1.1.3: host3
- 1.1.1.21: host21
- {% for zone in pillar['dnsmasq']['zones'] %}
- /tmp/{{ zone }}:
- file.managed:
- - contents:
- {% for ip, host in pillar['dnsmasq']['zones'][zone]['hosts']|dictsort %}
- {{ ip }} {{ host }}
- {% endfor %}
- {% endfor %}
- # cat /tmp/domain_com
- 1.1.1.1 host1
- 1.1.1.2 host2
- 1.1.1.21 host21
- 1.1.1.3 host3
- # cat /tmp/domain_com
- 1.1.1.1 host1
- 1.1.1.2 host2
- 1.1.1.3 host3
- 1.1.1.21 host21
Add Comment
Please, Sign In to add comment