From 7ebb0ccf3fd40d9c9d80ebe82e401a0993546ad3 Mon Sep 17 00:00:00 2001 From: samcday Date: Sun, 5 May 2013 20:17:34 +1000 Subject: [PATCH] Added support for SRV DNS record types. --- manifests/record/srv.pp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 manifests/record/srv.pp diff --git a/manifests/record/srv.pp b/manifests/record/srv.pp new file mode 100644 index 00000000..137372f3 --- /dev/null +++ b/manifests/record/srv.pp @@ -0,0 +1,22 @@ +define dns::record::srv ( + $zone, + $service, + $proto = "tcp", + $pri, + $weight, + $port, + $target, + $ttl = '') { + + $alias = "${service}:${proto}@${target}:${port},${pri},${weight},SRV,${zone}" + + $host = "_${service}._${proto}.${zone}." + + dns::record { $alias: + zone => $zone, + host => $host, + ttl => $ttl, + record => 'SRV', + data => "${pri}\t${weight}\t${port}\t${target}" + } +}