27 Aug 2006 20:17
Re: "Overruling" files from different darfts
Luke Kanies <luke <at> madstop.com>
2006-08-27 18:17:21 GMT
2006-08-27 18:17:21 GMT
On Aug 27, 2006, at 8:56 AM, Thorsten Sandfuchs wrote: > hio, > I'm trying to build a "master"-directory (general) with some base- > files to > spread, and a host/class-based directory-structure to override the > defaults, > if necessary. If a file only is present in the general-section, it > shouldn't > harm the setup, if it's only present in the host/class-section, it > should work > and if present in both, all of them, I would like to use the > "latest" line, in > the .pp-file as the valid one. Puppet is not very good at doing this style of full-directory overlay, and it's somewhat intentional. Its development is much more focused on managing elements, rather than whole files -- for instance, for apt sources I would specify each source which would then generate the file, rather than specifying the whole file. I have done what I could to make some aspects of file-based management possible, but I don't think you'll ever get the behaviour you want out of doing full directory overlays like it looks like you're trying to do. In fact, Puppet's parser specifically forbids the duplication you've got in your example -- you can't have two objects named '/etc', because that is considered a conflict that Puppet doesn't know how to resolve. You can specify multiple file sources for individual file, and the(Continue reading)
RSS Feed