Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been Googling around and haven't seen any examples of a more complex hieradata yaml config. Consider this:

# /path/to/hieradata/vhost/config.yaml
  port: 53002
  framework: wordpress
    - wp-content

  port: 53001
  framework: symfony
    - image
    - js
    - css

How would I access the port value for the vhost_config_melikedev entry?

share|improve this question
up vote 2 down vote accepted

Thanks to the guys in #puppet on You can do what I was asking by referencing the values like this:

define touch($app_primary, $app_sub) {


    $vhost_config_data = hiera("vhost_config_${name}")

    $tpl_port = $vhost_config_data[port]


You can also reference the values using the info outlined here:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.