Ask Your Question

getting hiera data into my erb template

asked 2013-05-13 18:52:01 -0600

Red Cricket gravatar image

updated 2013-05-13 23:12:25 -0600

Hi All,

I have a cgi that is spits out json and we are able to see the data via hiera command line like so

    [red@mypuppetmaster ~]$ hiera list_of_internal_dns_ip_addresses
    {""=>"", ""=>"", ""=>"", ""=>"", ""=>"", ""=>"", ""=>"", ""=>""}
  • The hostnames and IP address are made up.

... so our hiera.yaml is good. Next ... (more)

edit retag flag offensive close merge delete


Note, the documentation discourages using hieralookups in templates:

spuder gravatar imagespuder ( 2014-08-28 16:49:19 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-13 19:03:08 -0600

ramindk gravatar image

You have a simple mistake in your template. You're using a <%= at the start of your Ruby code on line 145 instead of a <% which you have correct in other places.

edit flag offensive delete link more


Thanks ramindk! <%= was definitively wrong. I will update my question with the code I am trying to use now.

Red Cricket gravatar imageRed Cricket ( 2013-05-13 20:37:51 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-05-13 18:52:01 -0600

Seen: 5,006 times

Last updated: May 13 '13