On Monday, December 17, 2012 6:21:25 PM UTC-6, Philip Brown wrote:
>
>
>
> On Monday, December 17, 2012 3:18:26 PM UTC-8, Jakov Sosic wrote:
>>
>>
>>
>> Puppet is not procedural but declarative language, so you can only 
>> declare states. 
>
>
> Except that is not strictly true.
> There is an early-exit "fail" directive that can be used conditionally.
> So why not a conditional early exit from a module, that allows other 
> modules to keep going?
> Perhaps it would help if I rephrased "exit" as some other more 
> state-friendly language, but nothing is coming to mind at the moment.
>


No, it wouldn't.  You are missing the point of the 'fail' function, which 
is to declare that it is impossible to compile a correct catalog for the 
target node.  Early parsing abortion is merely a side effect.

The bottom line is that the Puppet language does not have what you are 
asking for, given the tight constraints you have expressed on the solutions 
you are willing to accept.  Frankly, it's not well aligned with the Puppet 
paradigm.  You will have much more success and much less frustration (over 
time) if you learn to work within Puppet's natural structure and style than 
if you insist on fighting against it.

The other respondents are right: if you don't want a class assigned to a 
node then you should avoid assigning it to the node.  It's pretty silly to 
assign it but make that conditionally meaningless.  You don't necessarily 
need to pull the logic all the way up to an ENC, but you should pull it up 
at least one level.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Li5rPWirmVcJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to