Hello Dan,
Thanks. I'm following your suggestion and serializing anything complex
that I need to get at in ERB.
-- Greg
Dan Bode wrote:
Hi,
On Fri, Apr 2, 2010 at 3:37 PM, Greg Retkowski <[email protected]
<mailto:[email protected]>> wrote:
Good Afternoon,
I'm running puppet vers. 0.24.4 and am trying to use some facts
in puppet ERB templates.
.24.4 is a pretty old version of Puppet, if its feasible I would upgrade.
It appears as long as the fact is a simple type, such as a String,
the fact works as expected in the ERB template. However if the
fact is something more complex (like a Hash) it appears to get
converted into a string.
Using it directly in ruby (via Facter.value) returns the correct
complex data type.
Is there an elegant way to use complex facts in puppet's erb
templates?
Puppet will support hashes in the next major version (Rwolf), although
I am not sure if the interaction between Puppet and Facter will
support it. Until then, the best work around is to serialize the data
as a string and deserialize it in the erb.
Thanks for any help you may have!
Cheers,
-- Greg
Hope this helps,
-Dan
--
You received this message because you are subscribed to the Google
Groups "Puppet Users" group.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To unsubscribe from this group, send email to
[email protected]
<mailto:puppet-users%[email protected]>.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
--
You received this message because you are subscribed to the Google
Groups "Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.