Greetings,
  I was just reading this thread "Early clean exit from module?" 
[1]<https://groups.google.com/d/msg/puppet-users/2b1NB5wJsbM/F0HcnaYmK8YJ>on 
the idea of having an alternative to the fail function.  I believe that 
like the OP of that post, I am looking to replace modules usage of the fail 
function when choosing to bail on the puppet run for some reasonable cause.

  For example:

      case $::operatingsystem {
>         'Solaris': {
>           fail("Unsupported platform: ${::operatingsystem}")
>         }
>

  I am hoping to discover a means bail on the module but not on the entire 
puppet run.  Consider this use case...


   1. Using Foreman as an ENC, node classifications are defined by host 
   group and at the node level.  
   2. Host groups are useful because they can identify groups of similar 
   systems.  
   3. Suppose I have a host group for Virtual Machines, this group requires 
   that all its nodes use Razorsedge/puppet-vmwaretools 
[2]<https://github.com/razorsedge/puppet-vmwaretools>. 
   
   4. A new customer determines the need to run a platform like Solaris, 
   which is unsupported by the puppet module.
   5. Options -
      1. Within Foreman, redefine host group classifications, and host 
      memberships to create a VMWare group just for the 1 off platform.
      2. Fork the module and devote time to add platform support to the 
      module.
      3. Fork the module and notify/warn but quit processing module instead 
      of fail/bail on the puppet run.
      4. Fork the module and wrap the entire module in a conditional to 
      avoid unsupported platforms.
   
The Razorsedge module is well crafted, and does a gigantic conditional to 
avoid all hosts that do not have the fact virtual = vmware set.  Seems like 
a much better means of accomplishing this would be...

      case $::operatingsystem {
>         'Solaris': {
>           quit_nicely_and_continue_puppet_run("Unsupported platform: 
> ${::operatingsystem}")
>         }
>

I understand the arguments about being declarative, but if I can declare 
myself a failure, shouldn't I also be able to declare myself a success, 
even if in reality, I'm still a failure?

Thanks,

P.S. Ok, that last bit was far too personal.  :)



-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to