I still use extlookup (Yes, I know that it's deprecated :-( But I can't find time to move to hiera).

My problem - I need to move from puppet master/puppet agent setup, to puppet apply that is run locally. Everything was smooth... except of extlookup.

When I try to use:

puppet apply -e 'class { 'classX': }'

And if somewhere inside of classX (or inside of one of required classes) extlookup is used, extlookup_datadir is fully ignored. No matter where I'll define/declare that variable.

I tried in classX init.pp file above class declaration, and inside of class declaration.

So the question is - is possible to use extlookup somehow with

puppet apply -e

? :-)

  • The only solution that I see now, is to create sth.pp with node '...' definition, and add everything there. But this solution sucks :-) – Tomasz Olszewski Apr 7 '14 at 14:44

This is the only solution that came into my mind after some thinking:

cat<<EOF | puppet apply --noop
$(cat /etc/puppet/manifests/site.pp)
node "$(hostname -f)" {
    my::definition { "resName" }

As with puppetmaster setup I put in site.pp extlookup_datadir and extlookup_precedence. So I don't need to change anything in my manifests - only to use this "wrapper".

I'll appreciate any better solutions :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.