Perhaps you can use datacat_fragments exported resources and then collect them and put them together with the datacat_collector.
https://github.com/richardc/puppet-datacat/ Regards, El 10/09/2014 00:49, <[email protected]> escribió: > I have a difficult-to-manage application which does not implement a conf.d > or include syntax in its configuration, but requires a bunch of config > snippets that contain information only on groups of other servers. I've > been dealing with this by generating the config snippets from templates on > some servers as exported resources, realizing them on the central server, > and then executing an external script to "compile" these snippets into the > final config. > > This has a couple of drawbacks. First, it requires puppet to stat nearly > 15,000 little tiny config snippets every run that are not actually used > directly, and shouldn't need to exist. Second, the final config file, > because it's compiled by an external script, isn't under the control of > puppet, so it has no idea if that file gets modified by something outside.. > so it can't know to update it. > > I've been mulling over a better way to manage this config file, and I > think I've hit on an idea, but I have no idea if it will actually work, or > what the syntax would look like if it could. > > I'm thinking of replacing the @@file resources on the remote servers with > a defined type .. say .. @@data_container. Then, on the server where the > data is needed I could use a collector to iterate over the exported > resources reading data from them to use in the single template for the > final config file. > > Where the data is defined: > @@data_container { 'mydata': > someparameter => 'foo' > } > > And then in the template on the other host, somehow get a collection of > those resources into an array, and make use of their parameters as > variables to be referenced in the template.. > > <%- collection.each do |data| -%> > <%= data.someparameter %> > <%- end -%> > > Would this work at all? Is there syntax to support something like this? > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/7732833b-55f8-4e1b-8869-4ec231d36964%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/7732833b-55f8-4e1b-8869-4ec231d36964%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAF_B3dckc5ddaL%2BMbGokiQ6r1za1RZx8E7vw5VmszPOhMQ1jLg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
