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

On 2019-02-08 10:42, Helmut Schneider wrote:
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!



--

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

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/q3jl6n%2455t9%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to