puppet 3.6.2: future parser + extlookup() + environment based selector

19 views
Skip to first unread message

Sergey Arlashin

unread,
Sep 18, 2014, 3:17:19 PM9/18/14
to puppet...@googlegroups.com
Hi!

We use puppet 3.6.2 with several environments. One of them is vagrant based environment called 'localdev' which is intended for local use only. Also we keep all the secret data like passwords and related stuff in csv files which reside in separate repository. We use extlookup() function to get the data from these csv files. And of course this repo with secret data is unavailable for those ones who work with vagrant based environment 'localdev'.

For example some of our code looks like this:

smtp_password => $::environment ? {
default => extlookup('smtp_password'),
'localdev' => 'password'
},

When puppet is working with 'localdev' environment it does NOT try to execute extlookup() function at all. That's what we need.

With current parser everything worked without any problems. But today I tried to run our manifests with future parser enabled in 'localdev' environment. And got the following error:

==> node1: Error: No match found for 'smtp_password' in any data file during extlookup() on node node1.site
==> node1: Error: No match found for 'smtp_password' in any data file during extlookup() on node node1.site

I assume that future parser tries to execute extlookup() function even if the current environment is 'localdev'.

So I'm wondering if it is a bug? Or may be it is a normal behaviour of future parser ?

I hope I explained everything correctly :)

Thanks in advance!

--
Best regards,
Sergey Arlashin
Reply all
Reply to author
Forward
0 new messages