module-sudo/manifests/access.pp
Micah Anderson 6b3428b8c2 remove 'include sudo' because this would result in a duplicate definition if you
have in your site_sudo something like:

  class { 'sudo': deploy_sudoers => true }

instead we just declare a class dependency on the file in the define
2013-06-22 14:51:50 -04:00

21 行
487 B
Puppet

define sudo::access (
$ensure = 'present',
$user = undef,
$access = 'ALL=(ALL) ALL'
) {
if $user == undef {
$real_user = $name
} else {
$real_user = $user
}
# there shouldn't be a dot in those filenames!
file { "${sudo::dir}/01-user_access-${title}":
ensure => 'present',
owner => 'root',
group => 0,
mode => '0440',
content => "# THIS FILE IS MANAGED BY PUPPET !\n${real_user} ${access}\n",
require => Class['sudo']
}
}