On 25 August 2013 16:34, Henrik Lindberg <[email protected]>wrote:
> On 2013-26-08 1:07, Erik Dalén wrote: > >> On 25 August 2013 15:47, Henrik Lindberg <henrik.lindberg@cloudsmith.** >> com <[email protected]> >> <mailto:henrik.lindberg@**cloudsmith.com <[email protected]>>> >> wrote: >> >> I'm asking, what language do I use between <% %>? Can I write >> >> <% >> file { >> '/etc/motd': >> content => "hello, world\n" >> } >> %> >> >> At the technical parsing level, yes. This is then validated to only >> include what we want to allow. The first implementation is very >> permissive. >> >> >> which is what "Embedded Puppet" suggests to me. That's not the >> case, >> and "Puppet DSL" is only slightly less unclear, unless the reader >> is >> enough of a Rubyist to realize that "DSL" in the Ruby community >> refers >> to a modified Ruby environment, and not an entirely different >> language. Basically, please add a link so I know unambiguously >> what I >> can and cannot do between <% .. %>. >> >> All Puppet DSL expressions that do not require "top level" (i.e. >> class and define) can be used. >> >> >> They don't require top level in puppet manifests, this should be legal: >> >> class foo { >> class bar { >> ... >> } >> } >> >> I am using imprecise language, sorry. > The statements 'node', 'class xxx{}, and 'define xxx {}' are not allowed > in "conditional logic" which is the same as "nested block expression" which > is in fact an EPP is evaluated in. > > > just that it declares the classes foo and foo::bar, not foo and bar. >> >> Is this somehow disallowed in epp? >> >> Do you want to define classes and user defined types as a side effect > while producing template text? That seems odd. > The statement I made is only about Puppet DSL logic inside a template. > >> >> No, I don't want to, just seemed like a odd exception as it uses the same parser afaik. But the conditional logic/nested block thing explains it, thanks. -- Erik Dalén -- You received this message because you are subscribed to the Google Groups "Puppet Developers" 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-dev. For more options, visit https://groups.google.com/groups/opt_out.
