Since this shells out you could do something like this

onlyif  => "[ '${::operatingsystemrelease}' = '10.04' ]",


Thanks
Eric


On Apr 22, 2014, at 2:00 PM, Mike Reed <mjohn.r...@gmail.com> wrote:

> Hello all,
> 
> I've been stumped by this one and I was hoping for a little help.  I'd like 
> the below snippet to run only if the operating system is a specific 
> version.  Because facter already has the "operatingsystemrelease" variable, 
> I figured I'd use that but haven't had any luck getting it actually work.  
> Does anybody know how I would add the "onlyif" in the below snippet using 
> the "operatingsystemrelease" fact? 
> 
> I also suspect this could be the wrong way to do this and any advice would 
> be greatly appreciated.
> 
> file { "/var/lib/nfs/rpc_pipefs" :
>                       ensure   => "link" ,
>                       onlyif     => "${operatingsystemrelease}" == "10.04" 
> ,
>                       target    => "/run/rpc_pipefs" ,
>                }
> 
> *note: this onlyif does not work...just added for clarity in terms of what 
> I'm trying to achieve
> 
> Thanks in advance for the help.
> 
> Cheers,
> 
> Mike
> 
> -- 
> 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 puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/e27094d3-6774-4e21-bfe4-fe83895b84aa%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1BD3237B-4FB1-4FFC-B0CF-1CA999A71D98%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to