Hi,
On 02/19/2013 02:24 PM, Alexander Winkler wrote:
> Could anybody tell me how to add the secgroupY dynamically? (only if
> it's needed)
that's what virtual resources are for.
# on all nodes:
@group { groupA:
gid => 1000,
ensure => present,
}
### secondary groups
@group { secgroupX:
gid => 1200,
ensure => present,
}
@group { secgroupY:
gid => 1205,
ensure present,
}
# create these on all nodes
realize(Group["groupA", "secgroupX")
Then a wrapper for dynamic realization:
define realize_groups() { realize(Group["$name"]) }
And finally in the userloader define:
define userloader ($uid, $gid, $groups, $comment, $password,
$sshkeytype, $sshkey) {
...
if $groups {
realize_groups { $groups: }
}
...
}
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.