Hi,

making modules into noop is a fairly dangerous design, because your
manifest can and will just silently fail.

If you really *need* to assign dysfunctional features to your nodes, let
your profiles module take care of sorting them out based on facts.

profile::cool_linux_only_app {
    if $kernel == "Linux" {
        # include stuff
    }
}

That is assuming you are using roles/profiles. If you are not, then you
have an excuse to start now ;-)

Regards,
Felix

On 10/07/2014 04:14 PM, Danny Roberts wrote:
> Is it possible to make a module simply not be applied at all if it
> encounters an OS it does not support?
> 
> Currently doing a check for the OS and outputting a "fail" is standard
> amongst modules but this ends the Puppet run for the client if it has a
> module assigned that does this.
> 
> The use case is such that assigning a module that fails unless it finds
> a certain OS version to all nodes in Hiera like we do in my workplace
> via 'common.yaml' would cause all servers that do not match a required
> OS to fail it's Puppet runs from then on.
> 
> The only way I can think is to wrap most/all of the module's resources
> in if statements making the same OS checks again & again, which seems
> wasteful. Does anyone have an idea on how to do this better or is it
> something we should just ignore?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/543404EC.7060505%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to