summaryrefslogtreecommitdiff
path: root/manifests/record.pp
diff options
context:
space:
mode:
authorMarc Fournier <marc.fournier@camptocamp.com>2011-11-15 13:13:29 +0100
committerMarc Fournier <marc.fournier@camptocamp.com>2011-11-15 13:13:29 +0100
commit61452bec75976590a0293870d410ed0d3c80f843 (patch)
tree34cf56382b6489a3e680cfa9f49398b62ced59cd /manifests/record.pp
parentfa66d16ad547f68655b4eab9672592d63821e8ca (diff)
downloadpuppet-bind-61452bec75976590a0293870d410ed0d3c80f843.tar.gz
puppet-bind-61452bec75976590a0293870d410ed0d3c80f843.tar.bz2
file renaming to be compliant with recommended module structure.
Diffstat (limited to 'manifests/record.pp')
-rw-r--r--manifests/record.pp35
1 files changed, 35 insertions, 0 deletions
diff --git a/manifests/record.pp b/manifests/record.pp
new file mode 100644
index 0000000..d551d60
--- /dev/null
+++ b/manifests/record.pp
@@ -0,0 +1,35 @@
+/*
+
+= Definition: bind::record
+Helper to create any record you want (but NOT MX, please refer to Bind::Mx)
+
+Arguments:
+ *$zone*: Bind::Zone name
+ *$owner*: owner of the Resource Record
+ *$host*: target of the Resource Record
+ *$record_type°: resource record type
+ *$record_class*: resource record class. Default "IN".
+ *$ttl*: Time to Live for the Resource Record. Optional.
+
+*/
+define bind::record($ensure=present,
+ $zone,
+ $owner=false,
+ $host,
+ $record_type,
+ $record_class='IN',
+ $ttl=false) {
+
+ if $owner {
+ $_owner = $owner
+ } else {
+ $_owner = $name
+ }
+
+ common::concatfilepart {"${zone}.${record_type}.${name}":
+ ensure => $ensure,
+ file => "/etc/bind/pri/${zone}.conf",
+ content => template("bind/default-record.erb"),
+ notify => Service["bind9"],
+ }
+}