> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Douglas Garstang
> Sent: 03 June 2011 16:21
> To: [email protected]
> Subject: Re: [Puppet Users] Re: Resources existing in 
> different operating systems.

> All I was asking for was a way to conditional manage a 
> resource based on the operating system. Something like:
> 
> file {
> 
> $operatingsystem ? {
>   'centos' => {
>     "/etc/somefile":
>         source => .... 
>   },
>   'default' => {}
> }
> 
> Haven't tried it, but I don't think that's allowed.
> 
> Doug.

How about

case $operatingsystem {
        'centos': { $filesource = "/bar" }
        default: { $filesource = "/foo" }
}

file { "name":
        source => $filesource,
        # ...
}

-- 
Russell Howe
[email protected]

-- 
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.

Reply via email to