Hi, I have a new puppet install and I'm trying play with hiera.
By default, I have assumed all my nodes are in the production environment - since it's the only environment that exists.
I was having problems getting hiera to find a data source, then by debugging with `-d`, I realised the default `%{environment}` is returning `null`.
#hiera -d ntp::enable
DEBUG: 2015-11-28 23:18:50 +0000: Hiera YAML backend starting
DEBUG: 2015-11-28 23:18:50 +0000: Looking up ntp::enable in YAML backend
DEBUG: 2015-11-28 23:18:50 +0000: Looking for data source common
DEBUG: 2015-11-28 23:18:50 +0000: Cannot find datafile /etc/puppetlabs/code/environments//hieradata/common.yaml, skipping
When I pass the environment manually:
# hiera -d ntp::enable environment=production
DEBUG: 2015-11-28 23:18:43 +0000: Hiera YAML backend starting
DEBUG: 2015-11-28 23:18:43 +0000: Looking up ntp::enable in YAML backend
DEBUG: 2015-11-28 23:18:43 +0000: Looking for data source common
DEBUG: 2015-11-28 23:18:43 +0000: Found ntp::enable in common
true
What is best practice for assigning a global default environment to all nodes, without going via each node's puppet.conf? I have read the puppet docs on ENCs and node terminus but as a complete Puppet novice, they have me even more perplexed.
↧