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:
Antoine Beaupré 2013-04-24 15:23:55 -04:00
parent 1bc29f5ff5
commit a5dc3d88fd

View file

@ -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",
}
}