Tamas Papp
unread,Sep 3, 2014, 5:30:57 AM9/3/14Sign 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 Users
hi All,
I have a manifest with this (the module was downloaded from github for
generating known_hosts):
define ...{
[...things...]
## Ensure that all files and execs get the correct user/group
combinations.
Exec {
user => $user,
group => $user,
require => File[$root],
}
File {
ensure => $ensure ? { present => file, default => absent },
owner => $user,
group => $user,
}
}
My problem is that group -> $user does not true in all cases. Instead of
this I would like to use the true values of the user.
group should be something like
$group = `id -ng` user
group => $group,
This obviously doesn't work. But what is the right solution?
I am not master of puppets, but my guess is that I need a fact,
however, facts look good only for system wide settings.
Thank you,
tamas