use the builtin name variable instead of creating a new one
this allows us to simplify the manifests by using: extra-access { 'user': } .. instead of having to explicitely set it. if we need to have multiple users, we can do: extra-access { 'user_foo': name => 'user' }
This commit is contained in:
parent
819abc4863
commit
1bc29f5ff5
2 changed files with 4 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
|||
define sudo::extra-access($ensure = 'present', $user, $access = 'ALL=(ALL) ALL') {
|
||||
define sudo::extra-access($ensure = 'present', $access = 'ALL=(ALL) ALL') {
|
||||
file { "/etc/sudoers.d/01-user_access-$title":
|
||||
ensure => 'present',
|
||||
owner => root,
|
||||
group => admin,
|
||||
mode => 640,
|
||||
content => "# THIS FILE IS MANAGED BY PUPPET !\n\n$user $access\n",
|
||||
content => "# THIS FILE IS MANAGED BY PUPPET !\n\n$name $access\n",
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
define sudo::user-alias ($ensure = 'present', $groupname, $members) {
|
||||
define sudo::user-alias ($ensure = 'present', $members) {
|
||||
file { "/etc/sudoers.d/00-user_alias-$title":
|
||||
ensure => $ensure,
|
||||
owner => root,
|
||||
group => root,
|
||||
mode => 440,
|
||||
content => "# THIS FILE IS MANAGED BY PUPPET !\n\nUser_Alias $groupname = $members\n",
|
||||
content => "# THIS FILE IS MANAGED BY PUPPET !\n\nUser_Alias $name = $members\n",
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue