Re: [Puppet Users] Why IF-ELSE not work?

jcbollinger
Thu, 14 Feb 2013 14:41:33 -0000

On Thursday, February 14, 2013 5:55:35 AM UTC-6, blalor
wrote:
>
> Import is like a #include in C: it''s essentially a preprocessor
directive
> and is evaluated before the if/ else.
>
> http://docs.puppetlabs.com/puppet/2.7/reference/lang_import.html
>
>

But also, as I just remarked in another thread, ''import''
causes the
specified manifest to be parsed as a standalone manifest file.  That''s
decidedly *un*like cpp''s ''#include''.  As a result, it
is misleading to put
an ''import'' anywhere other than at top scope.  If you are
going to insist
on using ''import'', then at least do yourself the favor of
putting all your
''import'' lines at the very beginning of the manifest.


John