Version information
Start using this module
Add this module to your Puppetfile:
mod 'paulche-concat', '1.0.0'
Learn more about managing modules with a PuppetfileDocumentation
What is it?
A Puppet module that can construct files from fragments.
Please see the comments in the various .pp files for details as well as posts on my blog at http://www.devco.net/
Released under the Apache 2.0 licence
Usage:
If you wanted a /etc/motd file that listed all the major modules on the machine. And that would be maintained automatically even if you just remove the include lines for other modules you could use code like below, a sample /etc/motd would be:
Local sysadmins can also append to the file by just editing /etc/motd.local their changes will be incorporated into the puppet managed motd.
Detailed documentation of the class options can be found in the manifest files.
Known Issues:
- Since puppet-concat now relies on a fact for the concat directory, you will need to set up pluginsync = true on both the master and client node's '/etc/puppet/puppet.conf' for at least the first run. You have this issue if puppet fails to run on the client and you have a message similar to "err: Failed to apply catalog: Parameter path failed: File paths must be fully qualified, not 'undef' at [...]/concat/manifests/setup.pp:44".
Contributors:
Paul Elliot
- Provided 0.24.8 support, shell warnings and empty file creation support.
Chad Netzer
- Various patches to improve safety of file operations
- Symlink support
David Schmitt
- Patch to remove hard coded paths relying on OS path
- Patch to use file{} to copy the resulting file to the final destination. This means Puppet client will show diffs and that hopefully we can change file ownerships now
Peter Meier
- Basedir as a fact
- Unprivileged user support
Sharif Nassar
- Solaris/Nexenta support
- Better error reporting
Christian G. Warden
- Style improvements
Reid Vandewiele
- Support non GNU systems by default
Erik Dalén
- Style improvements
Gildas Le Nadan
- Documentation improvements
Paul Belanger
- Testing improvements and Travis support
Branan Purvine-Riley
- Support Puppet Module Tool better
Dustin J. Mitchell
- Always include setup when using the concat define
Andreas Jaggi
- Puppet Lint support
Jan Vansteenkiste
- Configurable paths
Contact:
puppet-users@ mailing list.
2013-08-09 1.0.0
Summary:
Many new features and bugfixes in this release, and if you're a heavy concat user you should test carefully before upgrading. The features should all be backwards compatible but only light testing has been done from our side before this release.
Features:
- New parameters in concat:
replace
: specify if concat should replace existing files.ensure_newline
: controls if fragments should contain a newline at the end.- Improved README documentation.
- Add rspec:system tests (rake spec:system to test concat)
Bugfixes
- Gracefully handle \n in a fragment resource name.
- Adding more helpful message for 'pluginsync = true'
- Allow passing
source
andcontent
directly to file resource, rather than defining resource defaults. - Added -r flag to read so that filenames with \ will be read correctly.
- sort always uses LANG=C.
- Allow WARNMSG to contain/start with '#'.
- Replace while-read pattern with for-do in order to support Solaris.
CHANGELOG:
- 2010/02/19 - initial release
- 2010/03/12 - add support for 0.24.8 and newer
- make the location of sort configurable - add the ability to add shell comment based warnings to top of files - add the ablity to create empty files
- 2010/04/05 - fix parsing of WARN and change code style to match rest
of the code
- Better and safer boolean handling for warn and force - Don't use hard coded paths in the shell script, set PATH top of the script - Use file{} to copy the result and make all fragments owned by root. This means we can chnage the ownership/group of the resulting file at any time. - You can specify ensure => "/some/other/file" in concat::fragment to include the contents of a symlink into the final file.
- 2010/04/16 - Add more cleaning of the fragment name - removing / from the $name
- 2010/05/22 - Improve documentation and show the use of ensure =>
- 2010/07/14 - Add support for setting the filebucket behavior of files
- 2010/10/04 - Make the warning message configurable
- 2010/12/03 - Add flags to make concat work better on Solaris - thanks Jonathan Boyett
- 2011/02/03 - Make the shell script more portable and add a config option for root group
- 2011/06/21 - Make base dir root readable only for security
- 2011/06/23 - Set base directory using a fact instead of hardcoding it
- 2011/06/23 - Support operating as non privileged user
- 2011/06/23 - Support dash instead of bash or sh
- 2011/07/11 - Better solaris support
- 2011/12/05 - Use fully qualified variables
- 2011/12/13 - Improve Nexenta support
- 2012/04/11 - Do not use any GNU specific extensions in the shell script
- 2012/03/24 - Comply to community style guides
- 2012/05/23 - Better errors when basedir isnt set
- 2012/05/31 - Add spec tests
- 2012/07/11 - Include concat::setup in concat improving UX
- 2012/08/14 - Puppet Lint improvements
- 2012/08/30 - The target path can be different from the $name
- 2012/08/30 - More Puppet Lint cleanup
- 2012/09/04 - RELEASE 0.2.0
- 2012/12/12 - Added (file) $replace parameter to concat
Copyright 2012 R.I.Pienaar Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.