I'm getting started with managing my code using hiera. Here's what my hiera.yaml looks like:
---
version: 5
defaults:
datadir: data
data_hash: yaml_data
hierarchy:
- name: "Secret data (encrypted)"
lookup_key: eyaml_lookup_key
path: "secret.eyaml"
options:
gpg_gnupghome: ''
- name: "Host-specific data"
path: "nodes/%{trusted.certname}.yaml"
- name: "OS release-specific data"
path: "os/%{facts.os.release.major}.yaml"
- name: "OS distro-specific data"
path: "os/%{facts.os.distro.codename}.yaml"
- name: "Common defaults"
path: "common.yaml"
and here is my common.yaml
resolv_conf::nameserver:
- 10.77.1.20
profile::ntp::servers:
- 0.us.pool.ntp.org iburst
- 1.us.pool.ntp.org iburst
- 2.us.pool.ntp.org iburst
- 3.us.pool.ntp.org iburst
I'm not seeing the values push out to my nodes when doing `puppet-code deploy --all --waitconf`
If I try to run `hiera -d -c hiera.yaml resolv_conf::nameservers` I get the following error:
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/hiera/config.rb:32:in `load': v5 hiera.yaml is only to be used inside an environment or a module and cannot be given to the global hiera (RuntimeError)
from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/hiera.rb:50:in `initialize'
from /opt/puppetlabs/puppet/bin/hiera:232:in `new'
from /opt/puppetlabs/puppet/bin/hiera:232:in `'
↧