knockout_prefix

7 views
Skip to first unread message

Helmut Schneider

unread,
Feb 8, 2019, 4:42:43 AM2/8/19
to puppet...@googlegroups.com
Hi,

hiera.conf:
:hierarchy:
- nodes/%{::fqdn}
- apps/apache
- common

apache.yaml:
---
lookup_options:
variables:
merge:
strategy: "deep"
knockout_prefix: "--"
[...]
profiles:
webserver:
apache:
server:
configfiles:
enable:
02-listen.conf:
Listen:
- abc
- 'localhost:80'
- 'localhost:443'

host.yaml:
profiles:
webserver:
apache:
server:
configfiles:
enable:
02-listen.conf:
Listen:
- --abc
- '--localhost:80'
- '--localhost:443'
- "80"
- "443"

init.pp:
[...]
$profiles = lookup({
"name" => "profiles",
"merge" => {
"strategy" => "deep",
"knockout_prefix" => "--",
# "sort_merged_arrays" => true,
},
"default_value" => [],
})
[...]

Result:

"02-listen.conf"=>{"Listen"=>["abc", "localhost:80", "localhost:443",
"443"]}

So I expected 'abc', "localhost:80" "localhost:443" to be removed while
'80' was.

helmut@puppet:~$ sudo /opt/puppetlabs/bin/puppetserver -v
puppetserver version: 2.8.1
helmut@puppet:~$

Thank you!

Helmut Schneider

unread,
Feb 8, 2019, 5:33:56 AM2/8/19
to puppet...@googlegroups.com
- "%{::operatingsystem}"
- apps/apache
- common

Ubuntu.yaml:
profiles:
webserver:
apache:
server:
configfiles:
enable:
03-chroot.conf:
LoadFile:
- '/lib/x86_64-linux-gnu/libgcc_s.so.1'
- '/lib/x86_64-linux-gnu/libnss_dns.so.2'

host.yaml:
profiles:
webserver:
apache:
server:
configfiles:
enable:
03-chroot.conf:
LoadFile:
- '--/lib/x86_64-linux-gnu/libgcc_s.so.1'
- '--/lib/x86_64-linux-gnu/libnss_dns.so.2'
- '/lib/i386-linux-gnu/libgcc_s.so.1'
- '/lib/i386-linux-gnu/libnss_dns.so.2'


Works fine. Hmmm....

Henrik Lindberg

unread,
Feb 9, 2019, 12:51:43 PM2/9/19
to puppet...@googlegroups.com
Judging from the version of Puppet Server you are on a version of Puppet
that has reached EOL. The hiera 5 support with features like
lookup_options was released late in the Puppet 4.x series but had some
issues before stabilizing in Puppet 5.

Can you try this with a newer puppet version? If the issue is still
there please file a ticket to enable the right people to have a look at
what could possibly be wrong.

Best,
- henrik
--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

Reply all
Reply to author
Forward
0 new messages