Hi! I'm starting to separate data from code in my puppet modules. I'm using hiera and can obtain specific hashes or arrays of values. It's amazing. I can use them in templates in a good way without problems. But in puppet manifests I'm having some problems. Is this code correct?:
$foo = [{"id" => "bar", "ip" => "1.1.1.1"}, {"id" => "baz", "ip" => "2.2.2.2"}]
define foo::map () {
$foo_id = $name['id']
$foo_ip = $name['ip']
}
foo::map {$foo:}
When I try that code the catalog fails with error:
err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship target "Test::Foo::Map[idbazip2.2.2.2]"
I thinks that all its correct...
Thanks in advance!