d705c23880
the term is more generic and avoids dashes in the name (which are deprecated from puppet 2.7)
13 lines
438 B
Puppet
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",
|
|
}
|
|
}
|