On Saturday, December 22, 2012 12:20:10 PM UTC-6, Luke Bigum wrote:
>
> Hi all,
>
> Does anyone know of a way to inspect resources that are already parsed in
> a node's manifest during catalog compilation? This would certainly need
> some serious Ruby Fu.
>
This is a bad idea. If your the Puppet circuits in your brain didn't trip
over "inspect", they certainly should have sounded the alarm over "serious
Ruby Fu". You are fighting against the tool.
>
> As an example, imagine I have a number of arbitrary files defined by
> multiple classes and it is impossible to get an all encompassing list of
> these files:
>
> file { 'woof': }
> file { 'cows': }
> file { 'meow': }
> ...
> $all_files = inline_template(...)
>
> I would like to be able to gather those file names into a Puppet variable
> - this would be parse order dependent. It would be fantastic if it could
> handle exported resources that have just been collected as well.
>
And "parse-order dependent"? Of course it is. You need a Puppet-bogometer.
So what configuration objective are you actually trying to accomplish
here? There is likely a more robust, less Rubyriffic way to accomplish it.
John
--
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/-/IP4c-a9fVJcJ.
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.