$user = $::operatingsystem ? {
/RedHat|CentOS/ => $::environment ? {
'production' => 'apache',
'dev' => 'nobody',
},
/Debian|Ubuntu/ => 'www-data',
}
On Wednesday, 11 April 2012 at 5:25 PM, Will S. G. wrote:
> Hi,
>
> I'm using one of the git projects for my Apache configuration. I'm now
> playing with Puppet environments, and I need to define a few parameters based
> on the environment. For example, I have params.pp:
>
> $user = $operatingsystem ? {
> /RedHat|CentOS/ => 'apache',
> /Debian|Ubuntu/ => 'www-data',
> }
>
> I'd like to be able to define the $user based on each environment. For
> example, apache is for production, and nobody is for dev. Is it possible to
> use a if/else statement to do this? If so, any examples I can use to
> understand how?
>
> --
> 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/-/tkZcfooPC0wJ.
> To post to this group, send email to [email protected]
> (mailto:[email protected]).
> To unsubscribe from this group, send email to
> [email protected]
> (mailto:[email protected]).
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
--
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.