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?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ahHYu4WJclkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to