On Tuesday, June 19, 2012 at 3:21 AM, Ryan Bowlby wrote:
I'm bumping up against the apparent limits of puppet. There appears to be a need for the ability to export data and not just resources. Then collecting this data and filtering based on specific values and or node facts. Nature will find a way....Examples of exported resources being used to overcome lack of exported "data":--- Gary Larriza contributed an haproxy module to the forge which exports a define containing a concat fragment. These are then used to assemble the haproxy config with appropriate balance members. https://github.com/glarizza/puppet-haproxy- Dan Bode created puppet-nodesearch to fill this need. I commend the effort but hope a final result would resemble the existing collection and exporting syntax, and generally be more puppety. https://github.com/puppetlabs/puppetlabs-nodesearch- Countless puppet-user threads related to abusing the exported file resource, then collecting them in some tempdir, then doing exec and looping through said files values. :(Perhaps being able to do something like:Export a variable to central datastore:@@$ganglia_cluster = "www1"Again with metaparam:@@$ganglia_cluster = "www1" { tag => "foo" }Realize said variables as hash whose key is $::fqdn on another node:$ganglia_clusters = realize("$ganglia_cluster")Creating:{ "some.fq.dn" => "www1", "another.fq.dn" => "mail1" }or with filtering:$ganglia_clusters = $ganglia_cluster <<| tag == "foo" |>>or with fact filtering$ganglia_clusters = $ganglia_cluster <<| tag == "foo" or $::architecture == "i386" |>>Obviously these examples are crap but I think the idea has some value. Allowing the use of these collected data types within templates would make sense. Doing so in a way that fits with the DSL and isn't overly complicated would add tremendous power.Thanks,Ryan Bowlby
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-dev/-/o2pJGxJSNasJ.
To post to this group, send email to puppe...@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
To unsubscribe from this group, send email to puppet-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-dev/-/KgBYoHn5ZwoJ.
To unsubscribe from this group, send email to puppet-dev+...@googlegroups.com.
I imagine the common use case - and the one I had - is generation of a configuration file where certain values must be dynamically derived based on data that is beyond the "node-scope". These values are inherently known to a subset of nodes who could provide them if given a means to do so. This is within the space of "configuration" management and not something like zookeeper.
Do you have cases where you need to search for things other than host names?Both your use case and Andrew's seem to be about finding hosts in sets, which is quite different from arbitrary data.
--
Do you have cases where you need to search for things other than host names?