module-sudo/manifests/access.pp
Antoine Beaupré f4f40c5718 autoloading fix
2013-06-22 13:40:28 -04:00

18 lines
438 B
Puppet

define sudo::access (
$ensure = 'present',
$user = undef,
$access = 'ALL=(ALL) ALL'
) {
include sudo
if $user == undef {
$real_user = $name
}
# 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",
}
}