add back the user parameter
it seems we can discriminate on the name parameter, it gives us duplicates as both title and name need to be unique
This commit is contained in:
parent
1bc29f5ff5
commit
a5dc3d88fd
1 changed files with 6 additions and 3 deletions
|
@ -1,9 +1,12 @@
|
|||
define sudo::extra-access($ensure = 'present', $access = 'ALL=(ALL) ALL') {
|
||||
file { "/etc/sudoers.d/01-user_access-$title":
|
||||
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}":
|
||||
ensure => 'present',
|
||||
owner => root,
|
||||
group => admin,
|
||||
mode => 640,
|
||||
content => "# THIS FILE IS MANAGED BY PUPPET !\n\n$name $access\n",
|
||||
content => "# THIS FILE IS MANAGED BY PUPPET !\n\n${user} ${access}\n",
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue