On Dec 16, 9:17 pm, Alexandre <alexandre.fou...@gmail.com> wrote: > I understand the meaning of declarative language. I just miss the > fact that i can not declare something like if something is not > included, then apply this whole set of declarations.
>From the glass-half-full department, I'd like to point out that this is only an issue in the first place because the Puppet language is rich enough that there can be some uncertainty about whether a particular class will be included for a particular node. You cannot solve your problem in the particular way you were trying to do, but that does not mean that you cannot solve it within Puppet, nor even that you cannot solve it within Puppet in a concise and maintainable way. The structure of the Puppet language strongly encourages modularity, in the sense of putting related logic and declarations in the same place. If you try to go against that grain, as it appears you did, then you are indeed likely to become frustrated. Nevertheless, you may be able to make that approach work with use of the built-in "defined" function or by writing your own custom function. I think the alternatives that Silviu and I, and now Peter, are suggesting are better aligned with with the language structure, however. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.