Hi.
I've defined a virtual user "kenneth", and depending on a variable in the
node definiton I'd like to add the users to different groups. Consider this
example:
###### Code start
node "server.example.com" {
$server_type = "typeA"
realize User[kenneth]
}
@user {"kenneth":
ensure => present,
uid => 1000,
gid => 1000,
groups => $server_type ? {
typeA => "wheel",
default => undef,
},
home => "/home/kenneth",
shell => "/bin/bash",
comment => "A comment",
password => '<something>'
}
###### Code end
If I add the user to an ordinary class (like "class user_kenneth") instead
of defining it as a virtual resource, everything works fine. But when using
a virtual definition like this, the variable "server_type" doesn't seem to
have any effect on the if statement "groups". Am I doing something wrong, or
is this not supposed to work? I'm running version 0.24.4.
Best regards,
Kenneth Holter
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---