Yehuda Katz
05/22/2022, 4:47 PMlookup('modulename::value')
would be loaded from hieradata/modules/modulename
and not from hieradata/modules/othermodule
. It would force people to put values into smaller, manageable files instead of a massive common.yaml
.
I personally don't think it is necessary either, but some of our admins insist on forking forge modules so they can add their own data/
directory instead of putting values in the environment storage because it can be hard to find things in a huge common.yaml
bastelfreak
05/22/2022, 4:55 PMshuaip
05/22/2022, 6:06 PMSlackbot
05/22/2022, 6:08 PMYehuda Katz
05/22/2022, 6:21 PM*
doesn't seem to work for me:
hiera config:
---
version: 5
hierarchy:
- name: "Vault"
lookup_key: hiera_vault
options:
confine_to_keys:
- '^vault::.*'
strip_from_keys:
- 'vault::'
ssl_verify: false
address: "<https://vault.example.com:8200>"
token: /run/vault-puppetserver/approleToken
default_field_parse: json
mounts:
puppet:
- 'nodes/%{::trusted.certname}'
- 'common'
- name: "Per-node data"
lookup_key: eyaml_lookup_key
options:
encrypt_method: gpg
gpg_gnupghome: /opt/puppetlabs/server/data/puppetserver/.gnupg
datadir: "site/hiera"
paths:
- "nodes/%{facts.hostname}.d/*.yaml"
- "nodes/%{facts.hostname}.yaml"
- name: "OS family/name/version"
datadir: "site/hiera"
paths:
- "os/%{facts.operatingsystem}%{facts.lsbmajdistrelease}.d/*.yaml"
- "os/%{facts.operatingsystem}%{facts.lsbmajdistrelease}.yaml"
- "os/%{facts.operatingsystem}.d/*.yaml"
- "os/%{facts.operatingsystem}.yaml"
- name: "Common data"
lookup_key: eyaml_lookup_key
options:
encrypt_method: gpg
gpg_gnupghome: /opt/puppetlabs/server/data/puppetserver/.gnupg
datadir: "site/hiera"
paths:
- "global.d/*.yaml"
- "global.yaml"
When I run puppet lookup --environment production --node <http://work1.pc.example.com|work1.pc.example.com> --explain puppet::runinterval
, it says the file doesn't exist:
Environment Data Provider (hiera configuration version 5)
Using configuration "/etc/puppetlabs/code/environments/production/hiera.yaml"
Hierarchy entry "Vault on <http://vault.example.com|vault.example.com>"
No such key: "puppet::runinterval"
[hiera-vault] Skipping hiera_vault backend because key 'puppet::runinterval' does not match confine_to_keys
Hierarchy entry "Per-node data"
Path "/etc/puppetlabs/code/environments/production/site/hiera/nodes/work1.d/*.yaml"
Original path: "nodes/%{facts.hostname}.d/*.yaml"
Path not found
Path "/etc/puppetlabs/code/environments/production/site/hiera/nodes/work1.yaml"
Original path: "nodes/%{facts.hostname}.yaml"
Path not found
Hierarchy entry "OS family/name/version"
Path "/etc/puppetlabs/code/environments/production/site/hiera/os/windows.d/*.yaml"
Original path: "os/%{facts.operatingsystem}%{facts.lsbmajdistrelease}.d/*.yaml"
Path not found
Path "/etc/puppetlabs/code/environments/production/site/hiera/os/windows.yaml"
Original path: "os/%{facts.operatingsystem}%{facts.lsbmajdistrelease}.yaml"
Path not found
Path "/etc/puppetlabs/code/environments/production/site/hiera/os/windows.d/*.yaml"
Original path: "os/%{facts.operatingsystem}.d/*.yaml"
Path not found
Path "/etc/puppetlabs/code/environments/production/site/hiera/os/windows.yaml"
Original path: "os/%{facts.operatingsystem}.yaml"
Path not found
Hierarchy entry "Common data"
Path "/etc/puppetlabs/code/environments/production/site/hiera/global.d/*.yaml"
Original path: "global.d/*.yaml"
Path not found
Path "/etc/puppetlabs/code/environments/production/site/hiera/global.yaml"
Original path: "global.yaml"
No such key: "puppet::runinterval"
When I look at the file system, there clearly is a file that should be loaded:
# ls /etc/puppetlabs/code/environments/production/site/hiera/os/windows.d/*.yaml
/etc/puppetlabs/code/environments/production/site/hiera/os/windows.d/puppet.yaml
# cat /etc/puppetlabs/code/environments/production/site/hiera/os/windows.d/puppet.yaml
---
puppet::runinterval: 1800
Yehuda Katz
05/22/2022, 6:21 PM*
doesn't seem to work for me:
hiera config (simplified):
---
version: 5
hierarchy:
- name: "OS family/name/version"
datadir: "site/hiera"
paths:
- "os/%{facts.operatingsystem}%{facts.lsbmajdistrelease}.d/*.yaml"
- "os/%{facts.operatingsystem}%{facts.lsbmajdistrelease}.yaml"
- "os/%{facts.operatingsystem}.d/*.yaml"
- "os/%{facts.operatingsystem}.yaml"
When I run puppet lookup --environment production --node <http://work1.pc.example.com|work1.pc.example.com> --explain puppet::runinterval
, it says the file doesn't exist:
Environment Data Provider (hiera configuration version 5)
Using configuration "/etc/puppetlabs/code/environments/production/hiera.yaml"
Hierarchy entry "Vault on <http://vault.example.com|vault.example.com>"
No such key: "puppet::runinterval"
[hiera-vault] Skipping hiera_vault backend because key 'puppet::runinterval' does not match confine_to_keys
Hierarchy entry "Per-node data"
Path "/etc/puppetlabs/code/environments/production/site/hiera/nodes/work1.d/*.yaml"
Original path: "nodes/%{facts.hostname}.d/*.yaml"
Path not found
Path "/etc/puppetlabs/code/environments/production/site/hiera/nodes/work1.yaml"
Original path: "nodes/%{facts.hostname}.yaml"
Path not found
Hierarchy entry "OS family/name/version"
Path "/etc/puppetlabs/code/environments/production/site/hiera/os/windows.d/*.yaml"
Original path: "os/%{facts.operatingsystem}%{facts.lsbmajdistrelease}.d/*.yaml"
Path not found
Path "/etc/puppetlabs/code/environments/production/site/hiera/os/windows.yaml"
Original path: "os/%{facts.operatingsystem}%{facts.lsbmajdistrelease}.yaml"
Path not found
Path "/etc/puppetlabs/code/environments/production/site/hiera/os/windows.d/*.yaml"
Original path: "os/%{facts.operatingsystem}.d/*.yaml"
Path not found
Path "/etc/puppetlabs/code/environments/production/site/hiera/os/windows.yaml"
Original path: "os/%{facts.operatingsystem}.yaml"
Path not found
Hierarchy entry "Common data"
Path "/etc/puppetlabs/code/environments/production/site/hiera/global.d/*.yaml"
Original path: "global.d/*.yaml"
Path not found
Path "/etc/puppetlabs/code/environments/production/site/hiera/global.yaml"
Original path: "global.yaml"
No such key: "puppet::runinterval"
When I look at the file system, there clearly is a file that should be loaded:
# ls /etc/puppetlabs/code/environments/production/site/hiera/os/windows.d/*.yaml
/etc/puppetlabs/code/environments/production/site/hiera/os/windows.d/puppet.yaml
# cat /etc/puppetlabs/code/environments/production/site/hiera/os/windows.d/puppet.yaml
---
puppet::runinterval: 1800
shuaip
05/22/2022, 6:29 PMYury Bushmelev
05/23/2022, 7:46 AMSlackbot
05/23/2022, 8:53 AMNeeloj
05/23/2022, 8:54 AMruntimeout=15m
in puppet.conf
on Windows machines, but sometimes this parameter dont work, and I get :
Run of Puppet configuration client already in progress; skipping (C:/ProgramData/PuppetLabs/puppet/cache/state/agent_catalog_run.lock exists)
does anyone know why? I dont fine any errors in Windows Event Logs related to that. only above line, its possible to force the runtimeout
?Massimiliano (Max)
05/23/2022, 10:35 AMDebug: Facter: Searching fact: ip6tables_version in core facts and external facts
Debug: Facter: Loading all internal facts
Debug: Facter: Loading external facts
Debug: Facter: fact "ip6tables_version" has resolved to: 1.4.21
Debug: Facter: resolving fact with user_query: ip6tables_version
Debug: Facter: Searching fact: ip6tables_version in file: ip6tables_version.rb
Debug: Facter: List of resolvable facts: [#<Facter::SearchedFact:0x000000000a8f45d0 @name="ip6tables_version", @fact_class=nil, @user_query="ip6tables_version", @type=:custom, @file=nil>]
it's always the same, and it changes only the string: 0x000000000....Massimiliano (Max)
05/23/2022, 10:45 AMMassimiliano (Max)
05/23/2022, 10:45 AMPierfrancesco Aiello
05/23/2022, 12:53 PMPierfrancesco Aiello
05/23/2022, 12:54 PMNeeloj
05/23/2022, 12:55 PMExecution of Puppet configuration client did not complete within 900 seconds and was terminated.
vchepkov
05/23/2022, 12:56 PMSlackbot
05/23/2022, 12:57 PMwhatsaranjit
05/23/2022, 12:58 PMwhatsaranjit
05/23/2022, 12:58 PMapache::vhost { '<http://redirect.example.com|redirect.example.com> non-ssl':
...Neeloj
05/23/2022, 1:08 PMgoeldi
05/23/2022, 1:49 PM[]' for nil:NilClass
I already downgraded semantic_puppet from 1.0.4 to 1.0.2 but it stays.
puppet agent version is 6.27.0hbui
05/23/2022, 1:51 PMDr Bunsen Honeydew
05/23/2022, 1:51 PMpuppet-python
module at https://forge.puppet.com/puppet/python?src=slack&channel=puppetgoeldi
05/23/2022, 2:04 PMDr Bunsen Honeydew
05/23/2022, 2:04 PMstankevich-python
module at https://forge.puppet.com/stankevich/python?src=slack&channel=puppetbastelfreak
05/23/2022, 2:05 PMDr Bunsen Honeydew
05/23/2022, 2:05 PMpuppet-python
module at https://forge.puppet.com/puppet/python?src=slack&channel=puppetSlackbot
05/23/2022, 2:42 PMtuxmea
05/23/2022, 2:43 PM