Hi

On Tuesday, January 11, 2011 5:51:07 AM UTC+1, Robin Lee Powell wrote:
>
> (I'm going a bit more for philosophical discussion than practicality
> here, maybe.  Do at least feel free to think in terms of what Puppet
> *should* do rather than tha fastest way to solve this problem.)
>
> There's a pattern I've run into a lot recently mhere a config file
> needs to be built based on information from a number of puppet
> managed hosts.  Assume here than I mean "node" in the puppet sense
> when I say "host".  *shrug*
>
> Use cases:
>
>   - backups, where each host has directories that need to be backed
>     up, and things need to be done on the individual backup client
>     hosts to handle that, and *also* stuff needs to be done on the
>     backup master
>
>   - deploy configuration, where each host has a deploy role and it
>     makes most sense to talk about the deploy role in each host's
>     puppet config, but the file that manages the deployment is on
>     the deploy master host
>
>   - VM configuration, where information about a VM needs to affect
>     data/configuration stored on the host that holds that VM
>
> All the same general pattern of action-at-a-distance: configuration
> on a number of hosts affecting the master config file on a single
> host.
>
This is exactly the case when you need exported resources and, therefore, 
storeconfigs.
http://projects.puppetlabs.com/projects/1/wiki/Exported_Resources

Also, multi-part config files: in at least some of these cases, the
> information from each host generates some configuration file output,
> perhaps from a template, but all of those bits of config file need
> to be merged together into one master config file.
>
You can build a file based on different "fragments" at least in 2 ways:
- When you specify an array of templates , when using the content => 
argument, these templates are actually appended in the defined order. 
- With the puppet-concat module by Rip 
https://github.com/ripienaar/puppet-concat you can build up files based on 
different fragments (and you can define single fragmensts as exported 
resources so that they fit the need you expressed). Incidentally, I've 
started to use it just yesterday, to build named.conf in a bind module, and 
does exactly what it says.

Hope it helps
Af

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to