I usually do this within the manifest itself. For example: if $facts['osfamily']!='RedHat'{fail("$operatingsystem is not supported")}
On Tuesday, August 22, 2017 at 7:34:12 AM UTC-4, plapp...@gmail.com wrote: > > Good morning :) > > I'm currently writing a puppet module for the OpenBSD specific > implementation of SNMPd, and was wondering if there is any elegant way for > the module to fail on unsupported operating systems? > > With the params.pp-pattern, you can fail as the default of the OS-specific > configuration; but how would I do this with the data comes via Hiera from > the module itself ( > https://docs.puppet.com/puppet/4.10/hiera_migrate_modules.html#module-data-with-yaml-data-files > )? > > Of course I can simply leave the common.yaml empty and the module will > fail with missing variables, but I'd rather have a helpful error message > about an unsupported OS (which will be less confusing, should this module > be used by someone else but me). > > > > > Kind regards, > > Jake > -- 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/6173b094-bf6b-468e-b20c-cf3865b51476%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.