Skip to content

Commit

Permalink
Merge pull request #20 from samcday/srvrecords
Browse files Browse the repository at this point in the history
Added support for SRV DNS record types.
  • Loading branch information
solarkennedy committed Apr 16, 2014
2 parents 09176e3 + 7ebb0cc commit a7b139c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions manifests/record/srv.pp
Original file line number Diff line number Diff line change
@@ -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}"
}
}

0 comments on commit a7b139c

Please sign in to comment.