You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
Hello,
I'm using hiera with puppet 3.7. What I need to do is pass in a formatted string to puppet to be used inside an erb template. What I'd really like is to use heredoc, but it doesn't seem like that is going to work. Does anyone have information on this and whether it is possible or not?
Thanks
Christopher Wood
unread,
Feb 18, 2015, 2:27:00 PM2/18/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
I tend to go for the lazy way, create my complicated string in something like a perl data structure where the language understand here docs and then dump it out to yaml. That way I have a set of yaml that I can copy into my hiera data.
It ends up hideous but usable (note line breaks):
---
key: this is the value of a key
long: "really really long really really long really really long really really long really really long really really long really really long \n\nreally really long really really long really really long really really long really really long really really long really really long really really long \n\n\nreally really long really really long really really long "
Otherwise I might encrypt it via hiera-eyaml, using the encryption as a fake-base64.
Or maybe store it like you would binary data in yaml, aka base64 itself? Not tried this one myself.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
El 18/02/15 a las 19:08, Mark Rosedale escribió:
Do you mean the | of the yaml? Like this?
my_formated_option: |
This is just a long formated text
more text
blah...
....
and this is the final
other_option: other_value
--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica Tfo: 868887590
Fax: 868888337