From 61452bec75976590a0293870d410ed0d3c80f843 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Tue, 15 Nov 2011 13:13:29 +0100 Subject: file renaming to be compliant with recommended module structure. --- manifests/definitions/bind-a.pp | 27 ----------- manifests/definitions/bind-aaaa.pp | 28 ------------ manifests/definitions/bind-cname.pp | 27 ----------- manifests/definitions/bind-mx.pp | 35 -------------- manifests/definitions/bind-ns.pp | 27 ----------- manifests/definitions/bind-record.pp | 35 -------------- manifests/definitions/bind-zone.pp | 88 ------------------------------------ 7 files changed, 267 deletions(-) delete mode 100644 manifests/definitions/bind-a.pp delete mode 100644 manifests/definitions/bind-aaaa.pp delete mode 100644 manifests/definitions/bind-cname.pp delete mode 100644 manifests/definitions/bind-mx.pp delete mode 100644 manifests/definitions/bind-ns.pp delete mode 100644 manifests/definitions/bind-record.pp delete mode 100644 manifests/definitions/bind-zone.pp (limited to 'manifests/definitions') diff --git a/manifests/definitions/bind-a.pp b/manifests/definitions/bind-a.pp deleted file mode 100644 index 3f30187..0000000 --- a/manifests/definitions/bind-a.pp +++ /dev/null @@ -1,27 +0,0 @@ -/* - -= 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=false, - $host, - $ttl=false) { - - bind::record {$name: - ensure => $ensure, - zone => $zone, - owner => $owner, - host => $host, - ttl => $ttl, - record_type => 'A', - } -} diff --git a/manifests/definitions/bind-aaaa.pp b/manifests/definitions/bind-aaaa.pp deleted file mode 100644 index 80291c2..0000000 --- a/manifests/definitions/bind-aaaa.pp +++ /dev/null @@ -1,28 +0,0 @@ -/* - -= Definition: bind::aaaa -Creates an IPv6 AAAA 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=false, - $host, - $ttl=false) { - - bind::record {$name: - ensure => $ensure, - zone => $zone, - owner => $owner, - host => $host, - ttl => $ttl, - record_type => 'AAAA', - } - -} diff --git a/manifests/definitions/bind-cname.pp b/manifests/definitions/bind-cname.pp deleted file mode 100644 index c8baeec..0000000 --- a/manifests/definitions/bind-cname.pp +++ /dev/null @@ -1,27 +0,0 @@ -/* - -= 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=false, - $host, - $ttl=false) { - - bind::record {$name: - ensure => $ensure, - zone => $zone, - owner => $owner, - host => $host, - ttl => $ttl, - record_type => 'CNAME', - } -} diff --git a/manifests/definitions/bind-mx.pp b/manifests/definitions/bind-mx.pp deleted file mode 100644 index 84a2b9f..0000000 --- a/manifests/definitions/bind-mx.pp +++ /dev/null @@ -1,35 +0,0 @@ -/* - -= 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]], - } -} - diff --git a/manifests/definitions/bind-ns.pp b/manifests/definitions/bind-ns.pp deleted file mode 100644 index 3d07aea..0000000 --- a/manifests/definitions/bind-ns.pp +++ /dev/null @@ -1,27 +0,0 @@ -/* - -= Definition: bind::ns -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=false, - $host, - $ttl=false) { - - bind::record {$name: - ensure => $ensure, - zone => $zone, - owner => $owner, - host => $host, - ttl => $ttl, - record_type => 'NS', - } -} diff --git a/manifests/definitions/bind-record.pp b/manifests/definitions/bind-record.pp deleted file mode 100644 index d551d60..0000000 --- a/manifests/definitions/bind-record.pp +++ /dev/null @@ -1,35 +0,0 @@ -/* - -= 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"], - } -} diff --git a/manifests/definitions/bind-zone.pp b/manifests/definitions/bind-zone.pp deleted file mode 100644 index 64da5da..0000000 --- a/manifests/definitions/bind-zone.pp +++ /dev/null @@ -1,88 +0,0 @@ -/* - -= 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, - $zone_contact=false, - $zone_serial=false, - $zone_refresh="3h", - $zone_retry="1h", - $zone_expiracy="1w", - $zone_ns=false, - $zone_xfers=false, - $zone_masters=false) { - - common::concatfilepart {"bind.zones.${name}": - ensure => $ensure, - notify => Service["bind9"], - file => "/etc/bind/zones/${name}.conf", - require => Package["bind9"], - } - - common::concatfilepart {"named.local.zone.${name}": - ensure => $ensure, - notify => Service["bind9"], - file => "/etc/bind/named.conf.local", - content => "include \"/etc/bind/zones/${name}.conf\";\n", - require => Package["bind9"], - } - - if $is_slave { - if !$zone_masters { - fail "No master defined for ${name}!" - } - Common::Concatfilepart["bind.zones.${name}"] { - content => template("bind/zone-slave.erb"), - } -## END of slave - } else { - if !$zone_contact { - fail "No contact defined for ${name}!" - } - if !$zone_ns { - fail "No ns defined for ${name}!" - } - if !$zone_serial { - fail "No serial defined for ${name}!" - } - if !$zone_ttl { - fail "No ttl defined for ${name}!" - } - - Common::Concatfilepart["bind.zones.${name}"] { - content => template("bind/zone-master.erb"), - } - - common::concatfilepart {"bind.00.${name}": - ensure => $ensure, - file => "/etc/bind/pri/${name}.conf", - content => template("bind/zone-header.erb"), - require => Package["bind9"], - } - - file {"/etc/bind/pri/${name}.conf.d": - ensure => directory, - mode => 0700, - purge => true, - recurse => true, - backup => false, - force => true, - } - } -} -- cgit v1.2.3