Yes, exactly, but this begs the question: Am I out of date for adding

        confine :operatingsystem => %w{Debian SLES OpenSUSE CentOS}

outside the setcode block?

Thanks,
Felix

On 12/18/2013 04:34 PM, Jeff Bachtel wrote:
> Facts are autoloaded from all modules and distributed to all agents,
> because that step occurs before the DSL is parsed for manifests (as it
> should be, because the DSL can be (is) impacted by facts).
> 
> It is up to the custom fact to case itself out of execution for certain
> operating systems. For instance, from the postgresql pupmod comes this
> snippet from the customer fact about default versions:
> 
> Facter.add("postgres_default_version") do
>   setcode do
>     result =
>       case Facter.value('osfamily')
>         when 'RedHat'
>           get_redhatfamily_postgres_version()
>         when 'Linux'
>           get_redhatfamily_postgres_version()
>         when 'Debian'
>           get_debianfamily_postgres_version()
>         else
>           nil
>       end
> 
> Jeff

-- 
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/52B1C1DF.6010608%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to