FAQ
Hi,

I have a puppet module with more than 15 blocks of resources.. based on a
validation I want puppet to decide to continue next blocks or skip with a
warning(with out failing).

currently I am doing this with a big if block.

class mymodule {
   if $::flag_enabled {
     package {...}

     files {...}
     ....
   }
   else
   {
     warning("Flag is disabled")
   }
}

Is there a way to skip the module something like this?

class mymodule {

   if not $::flag_enabled {
     warning("Flag is disabled, skipping mymodule")
     //skip executing below resources
   }
   package {..}
   file {...}
}

Appreciate your help on this.

Regards,
Jay

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

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 10, '13 at 5:59a
activeOct 10, '13 at 9:04p
posts5
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase