From ad347e8b260300963691692cda4882268e0a1d57 Mon Sep 17 00:00:00 2001 From: Nate Riffe Date: Sat, 5 Oct 2013 11:07:05 -0500 Subject: [PATCH] Purge zones and configs that aren't managed --- manifests/init.pp | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 47f18da..2444455 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -31,39 +31,35 @@ class bind ( hasstatus => true, require => Package[$bind::params::bind_package], } - - file { $confdir: - ensure => directory, + + File { + ensure => present, owner => 'root', - group => $bind::params::bind_group, - mode => '2755', + group => $::bind::params::bind_group, + mode => 0644, + } + + file { [ $confdir, "${confdir}/zones" ]: + ensure => directory, + mode => 2755, purge => true, + recurse => true, require => Package[$bind::params::bind_package], } file { "${confdir}/named.conf": - ensure => present, - owner => 'root', - group => $bind::params::bind_group, - mode => '0644', content => template('bind/named.conf.erb'), notify => Service[$bind::params::bind_service], require => Package[$bind::params::bind_package], } - file { [ "${confdir}/zones", "${confdir}/keys" ]: + file { "${confdir}/keys": ensure => directory, - owner => 'root', - group => $bind::params::bind_group, - mode => '0755', + mode => 0755, require => Package[$bind::params::bind_package], } file { "${confdir}/named.conf.local": - ensure => present, - owner => 'root', - group => $bind::params::bind_group, - mode => '0644', replace => false, require => Package[$bind::params::bind_package], }