diff options
author | Mathieu Bornoz <mathieu.bornoz@camptocamp.com> | 2012-08-02 09:30:21 +0200 |
---|---|---|
committer | Mathieu Bornoz <mathieu.bornoz@camptocamp.com> | 2012-08-02 09:30:21 +0200 |
commit | e9c9acdd15579bcb10ca9509c032819d3f808e53 (patch) | |
tree | 984d786ae04c0318b06d28c22bf05bb4f11b5257 /manifests/zone.pp | |
parent | fb0938204019fd14b030605ca8047f1c623bc38c (diff) | |
download | puppet-bind-e9c9acdd15579bcb10ca9509c032819d3f808e53.tar.gz puppet-bind-e9c9acdd15579bcb10ca9509c032819d3f808e53.tar.bz2 |
switch from common::concatfilepart to concat[1]
[1] https://github.com/camptocamp/puppet-concat
Diffstat (limited to 'manifests/zone.pp')
-rw-r--r-- | manifests/zone.pp | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/manifests/zone.pp b/manifests/zone.pp index 62df7fc..6829569 100644 --- a/manifests/zone.pp +++ b/manifests/zone.pp @@ -29,19 +29,31 @@ define bind::zone($ensure=present, $zone_xfers=false, $zone_masters=false, $zone_origin=false) { + + concat {"/etc/bind/pri/${name}.conf": + owner => root, + group => root, + mode => '0644', + } + + concat {"/etc/bind/zones/${name}.conf": + owner => root, + group => root, + mode => '0644', + } - common::concatfilepart {"bind.zones.${name}": + concat::fragment {"bind.zones.${name}": ensure => $ensure, + target => "/etc/bind/zones/${name}.conf", notify => Service["bind9"], - file => "/etc/bind/zones/${name}.conf", require => Package["bind9"], } - common::concatfilepart {"named.local.zone.${name}": + concat::fragment {"named.local.zone.${name}": ensure => $ensure, - notify => Service["bind9"], - file => "/etc/bind/named.conf.local", + target => "/etc/bind/named.conf.local", content => "include \"/etc/bind/zones/${name}.conf\";\n", + notify => Service["bind9"], require => Package["bind9"], } @@ -49,7 +61,7 @@ define bind::zone($ensure=present, if !$zone_masters { fail "No master defined for ${name}!" } - Common::Concatfilepart["bind.zones.${name}"] { + Concat::Fragment["bind.zones.${name}"] { content => template("bind/zone-slave.erb"), } ## END of slave @@ -67,21 +79,21 @@ define bind::zone($ensure=present, fail "No ttl defined for ${name}!" } - Common::Concatfilepart["bind.zones.${name}"] { + Concat::Fragment["bind.zones.${name}"] { content => template("bind/zone-master.erb"), } - common::concatfilepart {"00.bind.${name}": - ensure => $ensure, - file => "/etc/bind/pri/${name}.conf", + concat::fragment {"00.bind.${name}": + ensure => $ensure, + target => "/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, + ensure => absent, + mode => 0700, + purge => true, recurse => true, backup => false, force => true, |