onlyif => ["/usr/sbin/service bind9 status", "/usr/bin/test -z \"$( /bin/grep \'^${bind_user}:x:${bind_id}:\' /etc/passwd )\""],
before => User["${bind_user}"],
require => Package[bind9],
}
user { "${bind_user}":
ensure => present,
uid => "${bind_id}",
gid => "${bind_user}",
require => [ Exec["/usr/local/bin/uidmod.sh ${bind_id} ${bind_user}"], Group["${bind_user}"] ],
before => Service["bind9"],
}
file { "/var/lib/bind":
mode => "g+rwx",
group => "${bind_user}",
require => Group["${bind_user}"],
recurse => true,
}
file { "set superbit in /etc/bind":
path => "/etc/bind",
mode => "g+rws",
group => "${bind_user}",
require => Group["${bind_user}"],
}
file { "/etc/bind":
group => "${bind_user}",
require => File["set superbit in /etc/bind"],
recurse => true,
}
file { "/etc/default/bind9":
source => "file:///etc/puppet/modules/common/files/bind9.default",
require => File["/etc/bind", "/var/lib/bind"],
notify => Service["bind9"],
}