Issue #7688 has been updated by Peter Meier.

I have tried using and improving this module a bit. But due to some currently 
existing drawbacks and some problems while fixing these within the provider 
(mostly due to my bad knowledge about provider development) I went back to 
Volcane's concat version.

Problems I encountered:

* Newline problems in the fragments -> fixed in my github repo
* Diff problem if target file does not yet exist -> fixed in my github repo
* vardir is not /var/lib/puppet -> fixed in my github repo

A general problem that I see is that a lot of files/directories are created on 
each run by simply using the core ruby methods (FileUtils.mkdir_p, ...). This 
flattens the graph (as somebody noted on the mailinglist) but this introduces 
for example the following problem:

As purging is not done via File resources, I cannot place custom files within a 
fragments directory, without having it recreated each run. For example, I 
wanted to place a custom file outside of the directory structure, where admins 
could add things to that snippet, which then will be placed within the 
fragments dir via a file resource. If the provider would use puppet's own file 
managing mechanism to purge the directory, this would work without a problem 
and there would be no need to recreate the fragments dir on each run.

I started working on using real resources within the provider to create the 
necessary files and directories. For example I delegated the fragment creation 
to a simple file resource. However, I encountered some problems with ordering 
the auto generated resources within the graph correctly and due to my lack of 
real provider development knowledge I couldn't fix that within time and hence 
went back to use Volcane's concat module.

I think it would be good if puppet would have such a type either within core or 
at least in a module in the forge that is officially supported by puppetlabs. 
This is quite a nice feature and if you learned once how to use it, it can 
become quite powerful.

However, as also Daniel pointed out, the current solution has various problems 
which should be fixed before integrating it.

If people would be interested in my (broken) work I can upload it to a separate 
branch on my github account.

Anyway, thanks OnyxPoint for the first proposal and initiative to provide it to 
the wider audience!
----------------------------------------
Feature #7688: Review and potentially merge Onyx Point Concat module
https://projects.puppetlabs.com/issues/7688

Author: James Turnbull
Status: Needs Decision
Priority: Normal
Assignee: Nigel Kersten
Category: plug-ins
Target version: Telly
Affected Puppet version: 
Keywords: 
Branch: https://github.com/onyxpoint/pupmod-concat


Puppet Concat Module - This is a module that provides a native type for 
performing multi-part file concatenation, generally referred to by the Puppet 
Labs team as the File Fragment Pattern.

https://github.com/onyxpoint/pupmod-concat






-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to