Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 257

hiera.yaml doubts about config files

$
0
0
My /etc/puppetlabs/puppet/hiera.yaml on master host looks like: --- :backends: - yaml :hierarchy: - "fussion/common" - "nodes/%{::trusted.certname}" - common :yaml: # datadir is empty here, so hiera uses its defaults: # - /etc/puppetlabs/code/environments/%{environment}/hieradata on *nix # - %CommonAppData%\PuppetLabs\code\environments\%{environment}\hieradata on Windows # When specifying a datadir, make sure the directory exists. :datadir: The master runs on vm-lab-linux-1 host and the agent on puppet-pil00 The file /etc/puppetlabs/code/environments/production/hieradata/fussion/common.yaml on master host looks like: --- mdw_os_user: &mdw_os_user bea mdw_os_group: &mdw_os_group bea mdw_os_uid: &mdw_os_uid 1001 mdw_os_gid: &mdw_os_gid 1001 software_vol_name: app/software software_vol_quota: 10G software_vol_mountpoint: /software software_vol_mountpoint_owner: root software_vol_mountpoint_group: root software_vol_mountpoint_mode: '0555' domains_vol_name: app/domains domains_vol_quota: 10G domains_vol_mountpoint: /domains domains_vol_mountpoint_owner: *mdw_os_user domains_vol_mountpoint_group: *mdw_os_group domains_vol_mountpoint_mode: '0755' domain_os_user: *mdw_os_user domain_os_group: *mdw_os_group mdw_vol_name: app/middleware mdw_vol_quota: 10G mdw_vol_mountpoint: /middleware mdw_vol_mountpoint_owner: &mdw_os_user mdw_vol_mountpoint_group: &mdw_os_group mdw_vol_mountpoint_mode: '0755' When I do a lookup from the master host I can find the key mdw_os_group: [root@vm-lab-linux-1 puppetlabs]# hiera -d mdw_os_group environment=production DEBUG: 2017-03-17 11:17:12 +0100: Hiera YAML backend starting DEBUG: 2017-03-17 11:17:12 +0100: Looking up mdw_os_group in YAML backend DEBUG: 2017-03-17 11:17:12 +0100: Looking for data source fussion/common DEBUG: 2017-03-17 11:17:12 +0100: Found mdw_os_group in fussion/common bea However, the agent can't find the key properly: root@puppet-pil00:/usr/jdk# /opt/puppetlabs/bin/puppet agent -t Info: Using configured environment 'production' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Function lookup() did not find a value for the name 'mdw_os_group' on node puppet-pil00.msc.es Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run I'm new on puppet and I am not sure if I am configuring hiera properly. Why the agent can't find the mdw_os_group key?

Viewing all articles
Browse latest Browse all 257

Trending Articles