2013-04-24 21:23:55 +02:00
|
|
|
define sudo::extra-access($ensure = 'present', $user = undef, $access = 'ALL=(ALL) ALL') {
|
|
|
|
if $user == undef {
|
|
|
|
$user = $name
|
|
|
|
}
|
|
|
|
file { "/etc/sudoers.d/01-user_access-${name}":
|
2013-04-24 18:53:33 +02:00
|
|
|
ensure => 'present',
|
2013-04-24 20:01:34 +02:00
|
|
|
owner => root,
|
2013-04-24 21:27:25 +02:00
|
|
|
group => root,
|
2013-04-24 21:35:33 +02:00
|
|
|
mode => 0440,
|
2013-04-24 21:28:49 +02:00
|
|
|
content => "# THIS FILE IS MANAGED BY PUPPET !\n${user} ${access}\n",
|
2013-04-24 20:01:34 +02:00
|
|
|
}
|
|
|
|
}
|