diff options
Diffstat (limited to 'manifests/mx.pp')
-rw-r--r-- | manifests/mx.pp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/manifests/mx.pp b/manifests/mx.pp new file mode 100644 index 0000000..84a2b9f --- /dev/null +++ b/manifests/mx.pp @@ -0,0 +1,35 @@ +/* + += Definition: bind::mx +Creates an MX record. + +Arguments: + *$zone*: Bind::Zone name + *$owner*: owner of the Resource Record + *$priority*: MX record priority + *$host*: target of the Resource Record + *$ttl*: Time to Live for the Resource Record. Optional. + +*/ +define bind::mx($ensure=present, + $zone, + $owner=false, + $priority, + $host, + $ttl=false) { + + if $owner { + $_owner = $owner + } else { + $_owner = $name + } + + common::concatfilepart{"bind.${name}": + file => "/etc/bind/pri/${zone}", + ensure => $ensure, + notify => Service["bind9"], + content => template("bind/mx-record.erb"), + require => [Bind::Zone[$zone], Bind::A[$host]], + } +} + |