Erwin Bogaard
unread,Nov 9, 2012, 8:19:31 AM11/9/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
As I try to get some flexibility in the creation of users, I switched to a define.
problem is, I can't pass an array of user groups anymore. This either results in
- wrong group creation: group1,group1group2,group2 (see that group1 and group2 are concatenated in the middle, undefined group)
- error: Group names must be provided as an array, not a comma-separated list.
I use the following define:
define users::definitions (
$home = "/home/$title",
$usergroups = $title,
$ifensure = 'present',
) {
user {
"$title":
home => "$home",
managehome => true,
ensure => "$ifensure",
groups => "$usergroups",
}
...
}
And the following class to call the define:
class users {
users::definitions {
'rsnapshot':
usergroups => [ 'group1', 'group2' ];
}
}
Does anyone have an idea how to pass an array of groups to a define?