I wrote a role for managing MaraDNS with Ansible.
Requirements
- Ansible 2.1+ (might ork with prior versions too)
- Debian-based Linux-distribution
Installation
ansible-galaxy install whotwagner.maradns
Configuration Example
maradns_zones:
- name: example.com
email: support@example.com
spf:
- { val: 'v=spf1 ip4:212.41.224.0/24 -all' }
txt:
- { val: 'v=spf1 ip4:212.41.224.0/24 -all' }
- { name: 'xmas', val: 'Merry Christmas' }
ns:
- { val: ns1.example.com. }
- { val: ns2.example.com. }
- { name: 'subdom.%', val: 'ns1.%' }
mx:
- { prio: 5, rec: mx.example.com. }
- { prio: 10, rec: mx2.% }
srv:
- { name: "_sip._udp", val: "0 0 5060 sip.%" }
fqdn4:
- { domain: "mx", ip: "7.7.7.7" }
ptr:
- { domain: "www", ip: "8.8.8.8" }
a:
- { ip: 8.8.8.8 }
- { domain: 'www', ip: 8.8.8.8 }
- { domain: 'sip', ip: 6.6.6.6 }
# the following zone is disabled:
- name: alice.com
enabled: False