search for: function_hiera

Displaying 2 results from an estimated 2 matches for "function_hiera".

2012 Nov 23
3
how to query yaml file with hiera function.
...ppet/hieradata'' I also have a test/some_module.yaml file like this: --- db: root : pass port : ''3306'' I am also using the hiera function from a template like this class.pp $::class::var=''db'' template.erb <%= scope.function_hiera([var]) %> and that returns as expected the ''db'' hash... however , I would like to query the yaml file directly from the hiera function with something like: scope.function_hiera([var:root]), so to have access directly to the root:pass pair. but that doesnt seem to work. I...
2012 Feb 10
7
Hiera data unusable in a class with an array parameter
...rst IP": 1.2.3.4* * "Second IP": 5.6.7.8* and the module: *class iptables ($role) {* * file {/tmp/test:* * content => template(iptables/test.erb)* * }* *}* with the corresponding template test.erb: *<% role.each do |role| -%> * * code* *<% end %>* *<% scope.function_hiera(''allowed_ips'').each do |comment, ip| -%> * * code <%= ip %> code # <%= comment %>* *<% end %>* And finally calling them in the node: *node example.com {* * class {"iptables":* * role => ["role1", "role 2"]* * }* *}* The...