]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/concat/README.markdown
generate TLSA record for our mailserver ports
[dsa-puppet.git] / modules / concat / README.markdown
1 What is it?
2 ===========
3
4 A Puppet module that can construct files from fragments.
5
6 Please see the comments in the various .pp files for details
7 as well as posts on my blog at http://www.devco.net/
8
9 Released under the Apache 2.0 licence
10
11 Usage:
12 ------
13
14 If you wanted a /etc/motd file that listed all the major modules
15 on the machine.  And that would be maintained automatically even
16 if you just remove the include lines for other modules you could
17 use code like below, a sample /etc/motd would be:
18
19 <pre>
20 Puppet modules on this server:
21
22     -- Apache
23     -- MySQL
24 </pre>
25
26 Local sysadmins can also append to the file by just editing /etc/motd.local
27 their changes will be incorporated into the puppet managed motd.
28
29 <pre>
30 # class to setup basic motd, include on all nodes
31 class motd {
32    $motd = "/etc/motd"
33
34    concat{$motd:
35       owner => root,
36       group => root,
37       mode  => '0644',
38    }
39
40    concat::fragment{"motd_header":
41       target => $motd,
42       content => "\nPuppet modules on this server:\n\n",
43       order   => 01,
44    }
45
46    # local users on the machine can append to motd by just creating
47    # /etc/motd.local
48    concat::fragment{"motd_local":
49       target => $motd,
50       ensure  => "/etc/motd.local",
51       order   => 15
52    }
53 }
54
55 # used by other modules to register themselves in the motd
56 define motd::register($content="", $order=10) {
57    if $content == "" {
58       $body = $name
59    } else {
60       $body = $content
61    }
62
63    concat::fragment{"motd_fragment_$name":
64       target  => "/etc/motd",
65       content => "    -- $body\n"
66    }
67 }
68
69 # a sample apache module
70 class apache {
71    include apache::install, apache::config, apache::service
72
73    motd::register{"Apache": }
74 }
75 </pre>
76
77 Detailed documentation of the class options can be found in the
78 manifest files.
79
80 Known Issues:
81 -------------
82 * Since puppet-concat now relies on a fact for the concat directory,
83   you will need to set up pluginsync = true on the [master] section of your
84   node's '/etc/puppet/puppet.conf' for at least the first run.
85   You have this issue if puppet fails to run on the client and you have
86   a message similar to
87   "err: Failed to apply catalog: Parameter path failed: File
88   paths must be fully qualified, not 'undef' at [...]/concat/manifests/setup.pp:44".
89
90 Contributors:
91 -------------
92 **Paul Elliot**
93
94  * Provided 0.24.8 support, shell warnings and empty file creation support.
95
96 **Chad Netzer**
97
98  * Various patches to improve safety of file operations
99  * Symlink support
100
101 **David Schmitt**
102
103  * Patch to remove hard coded paths relying on OS path
104  * 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
105
106 **Peter Meier**
107
108  * Basedir as a fact
109  * Unprivileged user support
110
111 **Sharif Nassar**
112
113  * Solaris/Nexenta support
114  * Better error reporting
115
116 **Christian G. Warden**
117
118  * Style improvements
119
120 **Reid Vandewiele**
121
122  * Support non GNU systems by default
123
124 **Erik DalĂ©n**
125
126  * Style improvements
127
128 **Gildas Le Nadan**
129
130  * Documentation improvements
131
132 **Paul Belanger**
133
134  * Testing improvements and Travis support
135
136 **Branan Purvine-Riley**
137
138  * Support Puppet Module Tool better
139
140 **Dustin J. Mitchell**
141
142  * Always include setup when using the concat define
143
144 **Andreas Jaggi**
145
146  * Puppet Lint support
147
148 **Jan Vansteenkiste**
149
150  * Configurable paths
151
152 Contact:
153 --------
154 R.I.Pienaar / rip@devco.net / @ripienaar / http://devco.net