hi,
I have:
define users::account($realname='', $pwd='', $uid='', $othergroups,
$gid, $key, $keytype, $name='', $ensure=present, shell='/bin /
bash') {
<snip>
19 # have to find a way to get rid of group if last member is being
removed
20 # have to find out how to get an array in here.
21 if ! ($othergroups == '') {
22 group { $othergroups:
23 ensure => present;
24 }
25 }
<snip>
31 user { $name:
32 ensure => $ensure,
33 uid => $uid,
34 gid => $group,
35 password => $pwd,
36 comment => "$realname",
37 groups => "$othergroups",
38 shell => "$shell",
39 home => $home,
40 require => Group["$group"],
41 managehome => true;
42 }
and later :
class users::userlist {
96 @users::account {
97 "dork":
98 name => "dork",
99 realname => "dorkidork",
100 pwd => '<encr pwd>',
101 uid => 9000,
102 gid => 9000,
103 othergroups => "['blaat','dorks']",
last:
class users::realize inherits users::userlist {
120 # have to find out how to get <| $othergroups == 'blaat' |> in
here
121 realize(Users::Account[ "dork" ])
122 }
but I can't find a way to send my array of groups from class
user::userlist (i use realize later) to this function above.
when i quote the parrams slightly different a group "blaatdorks" is
being created and that has a member dork. (so it almost worked)
but when running this as pasted above puppet agent tells me:
err: Could not run Puppet configuration client: Parameter groups
failed: Group names must be provided as an array, not a comma-
separated list at /etc/puppet/modules/users/manifests/init.pp:42
please help me out. i've got some comments in there about other issues
i have, feel free to help me woth those as well ;-)
thanks in advance for any help!
regards,
Alex
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.