On Jun 2, 2010, at 6:26 PM, Daniel Pittman wrote:
Luke Kanies <[email protected]> writes:
On May 28, 2010, at 4:46 AM, Daniel Pittman wrote:
Luke Kanies <[email protected]> writes:
External data (that is, data specified outside of Puppet
manifests) seems
to keep coming up.
If you forgive me banging my own drum, it isn't just /external/
data; access
to data that puppet knows, like facts of other nodes, is equally
valuable in
some use cases.
eg: "give me an array of fqdn facts for hosts including
example::service"
I hit that when I run into trying to build multi-system services,
for
availability or scalability, but questions of this sort are
relatively
common
in the user list too.
This is a pretty different use case, but it's one I'm interested in
solving,
also. However, I want to make sure it's not just a case of 'make a
database
call and stick the results in an array'. You say you're banging
your own
drum here - do you solve this now?
Sorry, that was a poor choice of words. I meant "agitating for a
solution to
my problem, which is similar-but-not-identical to the one being
discussed."
Which is to say: I don't currently have a solution to this other
than this
horror:
1. on the source of each bit of information export a file tagged
"cross-host-info", which is imported on the puppetmaster. It
includes an
extra "tag" in the target path that is used later. (separate from
the
puppet storeconfig tag stuff.)
2. in the ERB template for each target machine scan those imported
files on
the puppetmaster, then build the template based on that.
(...or use generate to extract the data the same way.)
This gives me, in essence:
$array = get_cross_host_fact('hostname', 'some-useful-tag')
I think the things I would want are "get the hostname fact of
everything that
matches this expression", and "get the hostname, ipaddress, and foo
facts
of..."
The last would be an obvious "return an array of hashes" thing, and
probably
when that lands.
I don't /think/, right now, that I have a use-case for anything more
complicated than that. I certainly could just use the extlookup
tool and CSV
files to achieve the same results — just without the "dynamic" part.
Ok.
That's a different thing I've been trying to characterise, but like
you say, it's not quite external data.
How would you like this interface to work internally? That is, what
kinds of things do you need to be able to specify, and how would you
like to specify them?
--
I'm worried about Bart. Today, he's sucking people's blood,
tommorrow he might be smoking. -Marge Simpson
---------------------------------------------------------------------
Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" 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-dev?hl=en.