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

Hiera can't find environment - %{environment} = nil

$
0
0
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.

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>