Lab – troubleshoot Hiera
Troubleshoot the Hiera data in the production environment:
- SSH to the primary server, elevate to root, and deploy the
lab_error
environment:ssh centos@<primary_host> sudo su - puppet code deploy environment lab_error --wait
- Perform a lookup with the
debug
flag of theprofile::error::example
key on the primary server in thelab_error
environment and work through the errors found, correcting them in your control repo and running thecode deploy
command from the previous step:puppet lookup profile::error::example --debug --environment lab_error
- Resolve the errors in the data in
controlrepo-chapter9/data
andhiera.yaml
. - Run the same command with
explain
to understand how it gets to the current solution and why it is not finding a value based on itsos.family
fact:puppet lookup profile::error::example --debug --environment lab_error
- Update the Hiera data in the
control
repo branch,lab_error
, and redeploy so that the lookup now...