dump complete enc to file on client

29 views
Skip to first unread message

Michael Wörz

unread,
Sep 28, 2015, 7:10:35 AM9/28/15
to Puppet Users
Hello,

we want to dump ENC Data to a file on the puppet clients so that it can be used outside puppet scripts.

file{'/etc/config-enc':
  content => "$yaml"
}

does the Job but the output data is not formated an close to unreadable. Json or Yaml woukd be nice.

thanks

jcbollinger

unread,
Sep 28, 2015, 9:02:15 AM9/28/15
to Puppet Users
It's unclear what "ENC Data" means to you.  An ENC is a program that you provide.  When run it emits data (classes, parameter values, and global variable values), but that data must be in YAML format already, so I suppose it's not what you're looking for.  Perhaps your particular ENC relies on an external data file, and it's that data you want to pass on to clients; in that case, we'll need some more information about the nature of that file before we can give you any detailed help.

Generally speaking, however, formatting raw external data within Puppet probably depends either on writing a custom function or on use of OS utilities or an external program via the built-in generate() function.


John

Michael Wörz

unread,
Sep 28, 2015, 9:58:17 AM9/28/15
to puppet...@googlegroups.com
ENC was synonym for stuctured data passed to the puppet client. 
i solved it now using a ruby template:

<%= YAML.dump(yaml) %>

thanks

--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/itWQjnUCok8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c3832276-5be1-4ea8-bbb4-d720bdb5e9c3%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages