]> gitweb.fluxo.info Git - puppet-bind.git/commitdiff
(bind) added documentation in files.
authorCédric Jeanneret <cedric.jeanneret@camptocamp.com>
Thu, 11 Nov 2010 09:48:02 +0000 (10:48 +0100)
committerCédric Jeanneret <cedric.jeanneret@camptocamp.com>
Mon, 15 Nov 2010 13:21:11 +0000 (14:21 +0100)
manifests/classes/bind-base.pp
manifests/classes/bind-debian.pp
manifests/classes/bind.pp
manifests/definitions/bind-a.pp
manifests/definitions/bind-aaaa.pp
manifests/definitions/bind-cname.pp
manifests/definitions/bind-mx.pp
manifests/definitions/bind-ns.pp
manifests/definitions/bind-record.pp
manifests/definitions/bind-zone.pp

index b31189e8a6131b609c7b98a509cf1a3217e90e41..eb8942ed5f399ca4b277a59f4293f96cb0d93157 100644 (file)
@@ -1,3 +1,12 @@
+/*
+
+= Class: bind::base
+
+Declares some basic resources.
+You should NOT include this class as is, as it won't work at all!
+Please refer to Class["bind"].
+
+/*
 class bind::base {
   package {"bind9":
     ensure => present,
index f998a80fcda31b7f139066db6b720a57792fba06..ad4e4778e279e975ac0f10943841f71b9badfcc9 100644 (file)
@@ -1,3 +1,11 @@
+/*
+
+= Class: bind::debian
+Special debian class - inherits from bind::base
+
+You should not include this class - please refer to Class["bind"]
+
+*/
 class bind::debian inherits bind::base {
   Service["bind9"] {
     pattern => "/usr/sbin/named",
index dcede05d3410f05c7e9c40251d356fb2bab4560a..67bb0e05c72b51b5e5cb4a400d2419e1af23cfef 100644 (file)
@@ -1,3 +1,62 @@
+/*
+
+= Class: bind
+Include this class to install bind9 server on your node.
+
+Requires:
+- module common (git://github.com/camptocamp/puppet-common.git)
+
+Example:
+
+node "ns1.domain.ltd" {
+  include bind
+
+= Class: bind
+Include this class to install bind9 server on your node.
+
+Requires:
+- module common (git://github.com/camptocamp/puppet-common.git)
+
+Bind documentation:
+http://www.bind9.net/manuals
+
+Limitations:
+This modules is valid for Bind 9.7.1 (squeeze version).
+For 9.7.2, it will be really limited (no view nor ACL support).
+
+
+Example:
+
+node "ns1.domain.ltd" {
+  include bind
+  bind::zone {"domain.ltd":
+    ensure => present,
+    zone_contact => "contact.domain.ltd",
+    zone_ns      => $fqdn,
+    zone_serial  => "2010110804",
+    zone_ttl     => "604800",
+  }
+
+  bind::a {"ns $fqdn":
+    zone  => "domain.ltd",
+    owner => "${fqdn}.",
+    host  => $ipaddress,
+  }
+
+  bind::a {"mail.domain.ltd":
+    zone  => "domain.ltd",
+    owner => "mail",
+    host  => "6.6.6.6",
+  }
+
+  bind::mx {"mx1":
+    zone     => "domain.ltd",
+    owner    => "@",
+    priority => 1,
+    host     => "mail.domain.ltd",
+  }
+}
+*/
 class bind {
   case $operatingsystem {
     "Debian": { include bind::debian }
index 37153b859b2876a4ccaf9c062a689175239193bb..b0947d128f8fff8b599150c7139d0b33878521ff 100644 (file)
@@ -1,3 +1,15 @@
+/*
+
+= Definition: bind::a
+Creates an IPv4 record.
+
+Arguments:
+ *$zone*:  Bind::Zone name
+ *$owner*: owner of the Resource Record
+ *$host*:  target of the Resource Record
+ *$ttl*:   Time to Live for the Resource Record. Optional.
+
+*/
 define bind::a($ensure=present,
     $zone,
     $owner,
index a20a58c6afe08470f74e95eebb2b550df82d04c5..581e154c588b142e1d43f3da4e603dd2681a3df7 100644 (file)
@@ -1,3 +1,15 @@
+/*
+
+= Definition: bind::aaaa
+Creates an IPv6 AAA record.
+
+Arguments:
+ *$zone*:  Bind::Zone name
+ *$owner*: owner of the Resource Record
+ *$host*:  target of the Resource Record
+ *$ttl*:   Time to Live for the Resource Record. Optional.
+
+*/
 define bind::aaaa($ensure=present,
     $zone,
     $owner,
index e166738311b56a4eedf9864b87e0446300c0f616..d5e8209faba5a903e2a66fdc71e142f8474853cb 100644 (file)
@@ -1,3 +1,15 @@
+/*
+
+= Definition: bind::cname
+Creates a CNAME record.
+
+Arguments:
+ *$zone*:  Bind::Zone name
+ *$owner*: owner of the Resource Record
+ *$host*:  target of the Resource Record
+ *$ttl*:   Time to Live for the Resource Record. Optional.
+
+*/
 define bind::cname($ensure=present,
     $zone,
     $owner,
index 7eb63d01c0df5a999042079c511f6465150fe433..5090932cb0c585f52a479a57c5ff9cbbf5160289 100644 (file)
@@ -1,3 +1,16 @@
+/*
+
+= 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,
@@ -10,7 +23,7 @@ define bind::mx($ensure=present,
     ensure  => $ensure,
     notify  => Service["bind9"],
     content => template("bind/mx-record.erb"),
-    require => Bind::Zone[$zone],
+    require => [Bind::Zone[$zone], Bind::A[$host]],
   }
 }
 
index 9919f53a3eda4e9131bac4cfa1f54e0935b5563b..64a53204890a6fbea2e3c70c613f980da4809e78 100644 (file)
@@ -1,3 +1,15 @@
+/*
+
+= Definition: bind::mx
+Creates an NS record.
+
+Arguments:
+ *$zone*:  Bind::Zone name
+ *$owner*: owner of the Resource Record
+ *$host*:  target of the Resource Record
+ *$ttl*:   Time to Live for the Resource Record. Optional.
+
+*/
 define bind::ns($ensure=present,
     $zone,
     $owner,
index 5e0cf6f3205fb67ec99f75c8f9cbcc84bcd252ef..831230658b0d83b40152b08939357e588ae03977 100644 (file)
@@ -1,3 +1,17 @@
+/*
+
+= 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,
index 137bcd8946422adc2a5c26303b5736806b745b6f..091b9293a6a338dc5846638b8584b9c2666ad0ff 100644 (file)
@@ -1,3 +1,21 @@
+/*
+
+= Definition: bind::zone
+Creates a valid Bind9 zone.
+
+Arguments:
+  *$is_slave*:          Boolean. Is your zone a slave or a master? Default false
+  *$zone_ttl*:          Time period. Time to live for your zonefile (master only)
+  *$zone_contact*:      Valid contact record (master only)
+  *$zone_serial*:       Integer. Zone serial (master only)
+  *$zone_refresh*:      Time period. Time between each slave refresh (master only)
+  *$zone_retry*:        Time period. Time between each slave retry (master only)
+  *$zone_expiracy*:     Time period. Slave expiracy time (master only)
+  *$zone_ns*:           Valid NS for this zone (master only)
+  *$zone_xfers*:        IPs. Valid xfers for zone (master only)
+  *$zone_masters*:      IPs. Valid master for this zone (slave only)
+
+*/
 define bind::zone($ensure=present,
     $is_slave=false,
     $zone_ttl=false,