Skip to content

Commit 8c4e5fc

Browse files
author
Morgan Haskel
committed
Merge pull request #316 from bmjen/merge_2.0.x
Merge 2.0.x back to master
2 parents d654dea + bb55d80 commit 8c4e5fc

File tree

3 files changed

+120
-9
lines changed

3 files changed

+120
-9
lines changed

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
=======
2+
##2015-05-12 - Supported Release 2.0.0
3+
###Summary
4+
5+
This is a major release. Includes re-implementation of concat to use native Type and Providers, resulting in significantly improved performance and testability. Also includes a bugfix to alpha ordering of fragments.
6+
7+
####Features
8+
- Re-implementation of concat to use native Type and Providers.
9+
10+
####Bugfixes
11+
- Fixes a bug in alpha ordering of fragments.
12+
13+
14+
##2015-05-12 - Supported Release 1.2.2
15+
###Summary
16+
17+
This release includes a bugfix.
18+
19+
####Bugfixes
20+
- Fixes a bug introduced by MODULES-1700, in handling default retrieval of fragment backup parameter.
21+
22+
##2015-04-14 - Supported Release 1.2.1
23+
###Summary
24+
25+
This release includes bugfixes, test improvements, and a rewritten README.
26+
27+
####Bugfixes
28+
29+
- Verifies existence of $is_pe before using it.
30+
- Adds validation for $order param to not allow restricted characters.
31+
- Sets the group id on Fragments for versions of Facter that contain the $gid fact.
32+
- Sets the script group to 0 if the script is owned by root.
33+
- Explicitly sets script and concat directories to the same owner and group.
34+
- Re-adds support for fragment backup, so that static compiler can work with filebucket (MODULES-1700).
35+
136
##2015-02-17 - Supported Release 1.2.0
237
###Summary
338

README.md

Lines changed: 82 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,13 @@ When you're finished, the motd file will look something like this:
120120
* `concat`: Manages a file, compiled from one or more text fragments.
121121
* `concat::fragment`: Manages a fragment of text to be compiled into a file.
122122

123+
###Types
124+
* `concat_file`: Generates a file with content from fragments sharing a common unique tag.
125+
* `concat_fragment`: Manages the fragment.
126+
123127
###Parameters
124128

125-
####`concat`
129+
####Define: `concat`
126130

127131
All the parameters listed below are optional.
128132

@@ -134,6 +138,10 @@ Specifies whether (and how) to back up the destination file before overwriting i
134138

135139
Specifies whether the destination file should exist. Setting to 'absent' tells Puppet to delete the destination file if it exists, and negates the effect of any other parameters. Valid options: 'present' and 'absent'. Default value: 'present'.
136140

141+
#####`ensure_newline`
142+
143+
Specifies whether to add a line break at the end of each fragment that doesn't already end in one. Valid options: 'true' and 'false'. Default value: 'false'.
144+
137145
#####`force`
138146

139147
Deprecated as of concat v2.0.0. Has no effect.
@@ -178,7 +186,7 @@ If you set 'warn' to 'true', `concat` adds the following message:
178186
# This file is managed by Puppet. DO NOT EDIT.
179187
~~~
180188

181-
####`concat::fragment`
189+
####Define: `concat::fragment`
182190

183191
Except where noted, all the below parameters are optional.
184192

@@ -202,12 +210,80 @@ Specifies a file to read into the content of the fragment. **Note**: You must su
202210

203211
*Required.* Specifies the destination file of the fragment. Valid options: a string containing an absolute path.
204212

205-
###Removed functionality
206213

207-
The following functionality existed in previous versions of the concat module, but were removed in version 2.0.0:
214+
####Type: `concat_file`
215+
216+
#####`backup`
217+
218+
Specifies whether (and how) to back up the destination file before overwriting it. Your value gets passed on to Puppet's [native `file` resource](https://docs.puppetlabs.com/references/latest/type.html#file-attribute-backup) for execution. Valid options: 'true', 'false', or a string representing either a target filebucket or a filename extension beginning with ".". Default value: 'puppet'.
219+
220+
#####`ensure`
221+
222+
Specifies whether the destination file should exist. Setting to 'absent' tells Puppet to delete the destination file if it exists, and negates the effect of any other parameters. Valid options: 'present' and 'absent'. Default value: 'present'.
223+
224+
#####`ensure_newline`
225+
226+
Specifies whether to add a line break at the end of each fragment that doesn't already end in one. Valid options: 'true' and 'false'. Default value: 'false'.
227+
228+
#####`group`
229+
230+
Specifies a permissions group for the destination file. Valid options: a string containing a group name. Default value: undefined.
231+
232+
#####`mode`
233+
234+
Specifies the permissions mode of the destination file. Valid options: a string containing a permission mode value in octal notation. Default value: '0644'.
235+
236+
#####`order`
237+
238+
Specifies a method for sorting your fragments by name within the destination file. Valid options: 'alpha' (e.g., '1, 10, 2') or 'numeric' (e.g., '1, 2, 10'). Default value: 'numeric'.
239+
240+
You can override this setting for individual fragments by adjusting the `order` parameter in their `concat::fragment` declarations.
241+
242+
#####`owner`
243+
244+
Specifies the owner of the destination file. Valid options: a string containing a username. Default value: undefined.
245+
246+
#####`path`
247+
248+
Specifies a destination file for the combined fragments. Valid options: a string containing an absolute path. Default value: the title of your declared resource.
249+
250+
#####`replace`
251+
252+
Specifies whether to overwrite the destination file if it already exists. Valid options: 'true' and 'false'. Default value: 'true'.
253+
254+
####`tag`
255+
256+
*Required.* Specifies a unique tag reference to collect all concat_fragments with the same tag.
257+
258+
#####`validate_cmd`
259+
260+
Specifies a validation command to apply to the destination file. Requires Puppet version 3.5 or newer. Valid options: a string to be passed to a file resource. Default value: undefined.
261+
262+
####Type: `concat_fragment`
263+
264+
#####`content`
265+
266+
Supplies the content of the fragment. **Note**: You must supply either a `content` parameter or a `source` parameter. Valid options: a string. Default value: undef.
267+
268+
#####`order`
269+
270+
Reorders your fragments within the destination file. Fragments that share the same order number are ordered by name. Valid options: a string (recommended) or an integer. Default value: '10'.
271+
272+
#####`source`
273+
274+
Specifies a file to read into the content of the fragment. **Note**: You must supply either a `content` parameter or a `source` parameter. Valid options: a string or an array, containing one or more Puppet URLs. Default value: undefined.
275+
276+
#####`tag`
277+
278+
*Required.* Specifies a unique tag to be used by concat_file to reference and collect content.
279+
280+
#####`target`
281+
282+
*Required.* Specifies the destination file of the fragment. Valid options: a string containing an absolute path.
283+
284+
###Removed functionality
208285

209-
Parameters removed from `concat`:
210-
* `ensure_newline`
286+
The following functionality existed in previous versions of the concat module, but was removed in version 2.0.0:
211287

212288
Parameters removed from `concat::fragment`:
213289
* `gnu`

metadata.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"source": "https://github.com/puppetlabs/puppetlabs-concat",
88
"project_page": "https://github.com/puppetlabs/puppetlabs-concat",
99
"issues_url": "https://tickets.puppetlabs.com/browse/MODULES",
10+
"dependencies": [
11+
{"name":"puppetlabs/stdlib","version_requirement":">= 4.5.0 < 5.0.0"}
12+
],
1013
"operatingsystem_support": [
1114
{
1215
"operatingsystem": "RedHat",
@@ -103,8 +106,5 @@
103106
"name": "puppet",
104107
"version_requirement": "3.x"
105108
}
106-
],
107-
"dependencies": [
108-
{"name":"puppetlabs/stdlib","version_requirement":">= 4.5.0 < 5.0.0"}
109109
]
110110
}

0 commit comments

Comments
 (0)