Juan José Presa Rodal
2012-Mar-15 23:02 UTC
[Puppet Users] Simple array of hashes failed mapping. Hiera novice.
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!
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/ees-krmvIPQJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.