5 1. [Overview](#overview)
6 2. [Module Description - What the module does and why it is useful](#module-description)
7 * [Beginning with concat](#beginning-with-concat)
8 4. [Usage - Configuration options and additional functionality](#usage)
9 5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
10 * [Removed functionality](#removed-functionality)
11 6. [Limitations - OS compatibility, etc.](#limitations)
12 7. [Development - Guide for contributing to the module](#development)
17 The concat module lets you construct files from multiple ordered fragments of text.
19 <a id="module-description"></a>
22 The concat module lets you gather `concat::fragment` resources from your other modules and order them into a coherent file through a single `concat` resource.
24 <a id="beginning-with-concat"></a>
25 ### Beginning with concat
27 To start using concat you need to create:
29 * A concat{} resource for the final file.
30 * One or more concat::fragment{}s.
32 A minimal example might be:
39 concat::fragment { 'tmpfile':
40 target => '/tmp/file',
41 content => 'test contents',
49 ### Maintain a list of the major modules on a node
51 To maintain an motd file that lists the modules on one of your nodes, first create a class to frame up the file:
63 concat::fragment { 'motd_header':
65 content => "\nPuppet modules on this server:\n\n",
69 # let local users add to the motd by creating a file called
71 concat::fragment { 'motd_local':
73 source => '/etc/motd.local',
78 # let other modules register themselves in the motd
79 define motd::register (
89 concat::fragment { "motd_fragment_$name":
90 target => '/etc/motd',
92 content => " -- $body\n"
97 Then, in the declarations for each module on the node, add `motd::register{ 'Apache': }` to register the module in the motd.
101 include apache::install, apache::config, apache::service
103 motd::register { 'Apache': }
107 These two steps populate the /etc/motd file with a list of the installed and registered modules, which stays updated even if you just remove the registered modules' `include` lines. System administrators can append text to the list by writing to /etc/motd.local.
109 When you're finished, the motd file will look something like this:
112 Puppet modules on this server:
117 <contents of /etc/motd.local>
120 <a id="reference"></a>
123 See [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-concat/blob/master/REFERENCE.md)
125 <a id="removed-functionality"></a>
126 ### Removed functionality
128 The following functionality existed in previous versions of the concat module, but was removed in version 2.0.0:
130 Parameters removed from `concat::fragment`:
137 The `concat::setup` class has also been removed.
139 Prior to concat version 2.0.0, if you set the `warn` parameter to a string value of `true`, `false`, 'yes', 'no', 'on', or 'off', the module translated the string to the corresponding boolean value. In concat version 2.0.0 and newer, the `warn_header` parameter treats those values the same as other strings and uses them as the content of your header message. To avoid that, pass the `true` and `false` values as booleans instead of strings.
141 <a id="limitations"></a>
144 This module has been tested on [all PE-supported platforms](https://forge.puppetlabs.com/supported#compat-matrix), and no issues have been identified.
146 For an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-concat/blob/master/metadata.json)
148 <a id="development"></a>
151 We are experimenting with a new tool for running acceptance tests. It's name is [puppet_litmus](https://github.com/puppetlabs/puppet_litmus) this replaces beaker as the test runner. To run the acceptance tests follow the instructions [here](https://github.com/puppetlabs/puppet_litmus/wiki/Tutorial:-use-Litmus-to-execute-acceptance-tests-with-a-sample-module-(MoTD)#install-the-necessary-gems-for-the-module).
153 Puppet modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can't access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
155 We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
157 For more information, see our [module contribution guide](https://puppet.com/docs/puppet/latest/contributing.html).
161 Richard Pijnenburg ([@Richardp82](http://twitter.com/richardp82))
163 Joshua Hoblitt ([@jhoblitt](http://twitter.com/jhoblitt))
165 [More contributors](https://github.com/puppetlabs/puppetlabs-concat/graphs/contributors).