Hi,
my hiera.yaml:
---
version: 5
defaults:
datadir: /etc/puppetlabs/code/environments/%{::environment}/hieradata
data_hash: yaml_data
hierarchy:
- name: "Nodes"
path: "nodes/%{::fqdn}.yaml"
- name: "Domains"
globs:
- "domains/%{::domain}/*.yaml"
- name: "Operating Systems"
paths:
- "%{::operatingsystem}-%{::operatingsystemrelease}.yaml"
- "%{::operatingsystem}-%{::virtual}.yaml"
- "%{::operatingsystem}.yaml"
- "%{::kernel}.yaml"
- name: "Roles"
path: "roles.yaml"
- name: "Profiles"
path: "profiles.yaml"
- name: "Applications"
globs:
- "apps/*.yaml"
- name: "Common settings"
path: "common.yaml"
common.yaml:
---
lookup_options:
classes:
merge:
strategy: 'deep'
knockout_prefix: '--'
[...]
classes:
- cron
- environment_files::common
- environment_files::%{facts.operatingsystem}
- logrotate
- my_facts
- my_perl
- my_puppet
- my_snmpd
- my_sudo
- openntpd
- openssh
- shell_scripts::install
- users
config.pp:
[...]
class config {
$classes = lookup({
"name" => "classes",
"merge" => {
"strategy" => "deep",
"knockout_prefix" => "--",
"sort_merged_arrays" => true,
},
"default_value" => {},
})
[...]
I'm trying to knockout "opennntpd". This works on CentOS in CentOS.yaml:
---
[...]
classes:
- --openntpd
- my_ntpd
but not in Ubuntu-openvzve.yaml:
---
[...]
classes:
- --openntpd
- my_ntpd
helmut@puppet:/etc/puppetlabs/code/environments/production/hieradata$
sudo grep -ir openntpd .
./common.yaml: - openntpd
./Ubuntu-openvzve.yaml: - --openntpd
./CentOS.yaml: - --openntpd
helmut@puppet:/etc/puppetlabs/code/environments/production/hieradata$
Ubuntu-openvzve.yaml is read successfully, if I enter a bogus value it
get's evaluated.
helmut@h2873756:~$ facter operatingsystem virtual
operatingsystem => Ubuntu
virtual => openvzve
helmut@h2873756:~$
How can I debug further?
helmut@puppet:~$ puppet -V
7.14.0
helmut@puppet:~$ lsb_release -d
Description: Ubuntu 20.04.4 LTS
helmut@puppet:~$
Thank you!
--
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/t1hcng%24pfb%241%40ciao.gmane.io.