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

How do I use hiera's calling_class_path pseudo variable from the command line?

$
0
0
Whenever I do any hiera troubleshooting, I do hiera lookups via hiera's cli utility, e.g.: $ hiera {key} ::environment=dev ::role=webserver --config /etc/puppetlabs/code/hiera.yaml However in hiera.yaml, I am also making use of the "calling_class_path" pseudo-variable: https://docs.puppet.com/hiera/3.1/puppet.html#special-pseudo-variables Therefore my hiera.yaml file looks like this: $ cat /etc/puppetlabs/code/hiera.yaml --- :backends: - yaml - eyaml :hierarchy: - "%{::role}" - "%{calling_class_path}" - common :yaml: :datadir: "/etc/puppetlabs/code/environments/%{::environment}/hieradata" In this scenario, does anyone know how to write my hiera command to feed in a value for this pseudo variable?

Viewing all articles
Browse latest Browse all 257

Trending Articles