module-sudo/manifests/access.pp
Gabriel Filion d705c23880 change name to "access"
the term is more generic and avoids dashes in the name (which are
deprecated from puppet 2.7)
2013-04-25 18:51:18 -04:00

13 lines
438 B
Puppet

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