diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 064443f..8424781 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,65 +1,65 @@
name: "release"
on:
push:
branches:
- 'release'
jobs:
LitmusAcceptancePuppet5:
env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
runs-on: self-hosted
strategy:
matrix:
ruby_version: [2.5.x]
puppet_gem_version: [~> 6.0]
platform: [release_checks_5]
agent_family: ['puppet5']
steps:
- uses: actions/checkout@v1
- name: Litmus Parallel
- uses: puppetlabs/action-litmus_parallel@master
+ uses: puppetlabs/action-litmus_parallel@main
with:
platform: ${{ matrix.platform }}
agent_family: ${{ matrix.agent_family }}
LitmusAcceptancePuppet6:
env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
runs-on: self-hosted
strategy:
matrix:
ruby_version: [2.5.x]
puppet_gem_version: [~> 6.0]
platform: [release_checks_6]
agent_family: ['puppet6']
steps:
- uses: actions/checkout@v1
- name: Litmus Parallel
- uses: puppetlabs/action-litmus_parallel@master
+ uses: puppetlabs/action-litmus_parallel@main
with:
platform: ${{ matrix.platform }}
agent_family: ${{ matrix.agent_family }}
Spec:
runs-on: self-hosted
strategy:
matrix:
check: [parallel_spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
ruby_version: [2.5.x]
puppet_gem_version: [~> 5.0, ~> 6.0]
exclude:
- puppet_gem_version: ~> 5.0
check: 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
- ruby_version: 2.5.x
puppet_gem_version: ~> 5.0
steps:
- uses: actions/checkout@v1
- name: Spec Tests
- uses: puppetlabs/action-litmus_spec@master
+ uses: puppetlabs/action-litmus_spec@main
with:
puppet_gem_version: ${{ matrix.puppet_gem_version }}
check: ${{ matrix.check }}
diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml
index 531f93d..2307d88 100644
--- a/.github/workflows/weekly.yml
+++ b/.github/workflows/weekly.yml
@@ -1,64 +1,64 @@
name: "weekly"
on:
schedule:
- cron: '0 5 * * 2'
jobs:
LitmusAcceptancePuppet5:
env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
runs-on: self-hosted
strategy:
matrix:
ruby_version: [2.5.x]
puppet_gem_version: [~> 6.0]
platform: [release_checks_5]
agent_family: ['puppet5']
steps:
- uses: actions/checkout@v1
- name: Litmus Parallel
- uses: puppetlabs/action-litmus_parallel@master
+ uses: puppetlabs/action-litmus_parallel@main
with:
platform: ${{ matrix.platform }}
agent_family: ${{ matrix.agent_family }}
LitmusAcceptancePuppet6:
env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
runs-on: self-hosted
strategy:
matrix:
ruby_version: [2.5.x]
puppet_gem_version: [~> 6.0]
platform: [release_checks_6]
agent_family: ['puppet6']
steps:
- uses: actions/checkout@v1
- name: Litmus Parallel
- uses: puppetlabs/action-litmus_parallel@master
+ uses: puppetlabs/action-litmus_parallel@main
with:
platform: ${{ matrix.platform }}
agent_family: ${{ matrix.agent_family }}
Spec:
runs-on: self-hosted
strategy:
matrix:
check: [parallel_spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
ruby_version: [2.5.x]
puppet_gem_version: [~> 5.0, ~> 6.0]
exclude:
- puppet_gem_version: ~> 5.0
check: 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
- ruby_version: 2.5.x
puppet_gem_version: ~> 5.0
steps:
- uses: actions/checkout@v1
- name: Spec Tests
- uses: puppetlabs/action-litmus_spec@master
+ uses: puppetlabs/action-litmus_spec@main
with:
puppet_gem_version: ${{ matrix.puppet_gem_version }}
check: ${{ matrix.check }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e5c70d8..984ed9f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,513 +1,513 @@
# Change log
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
## [v6.2.0](https://github.com/puppetlabs/puppetlabs-concat/tree/v6.2.0) (2020-01-21)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-concat/compare/v6.1.0...v6.2.0)
### Added
- pdksync - \(FM-8581\) - Debian 10 added to travis and provision file refactored [\#624](https://github.com/puppetlabs/puppetlabs-concat/pull/624) ([david22swan](https://github.com/david22swan))
- \(FM-8698\) - Addition of Support for CentOS 8 [\#615](https://github.com/puppetlabs/puppetlabs-concat/pull/615) ([david22swan](https://github.com/david22swan))
- FM-8398 - support Debian10 [\#599](https://github.com/puppetlabs/puppetlabs-concat/pull/599) ([lionce](https://github.com/lionce))
### Fixed
- Fix newline handling at the end of fragments [\#623](https://github.com/puppetlabs/puppetlabs-concat/pull/623) ([SimonPe](https://github.com/SimonPe))
## [v6.1.0](https://github.com/puppetlabs/puppetlabs-concat/tree/v6.1.0) (2019-07-23)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-concat/compare/v6.0.0...v6.1.0)
### Added
- FM-8049 - add redhat8 support [\#584](https://github.com/puppetlabs/puppetlabs-concat/pull/584) ([lionce](https://github.com/lionce))
### Fixed
- \(MODULES-9479\) Fix nested array merge behavior [\#593](https://github.com/puppetlabs/puppetlabs-concat/pull/593) ([seanmil](https://github.com/seanmil))
- \(FM-8317\) Updated regex to allow for windows paths with \'s [\#591](https://github.com/puppetlabs/puppetlabs-concat/pull/591) ([pgrant87](https://github.com/pgrant87))
- \(bugfix\) allow private keys in ssh testing [\#585](https://github.com/puppetlabs/puppetlabs-concat/pull/585) ([tphoney](https://github.com/tphoney))
## [v6.0.0](https://github.com/puppetlabs/puppetlabs-concat/tree/v6.0.0) (2019-05-21)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-concat/compare/5.3.0...v6.0.0)
### Changed
- pdksync - \(MODULES-8444\) - Raise lower Puppet bound [\#575](https://github.com/puppetlabs/puppetlabs-concat/pull/575) ([david22swan](https://github.com/david22swan))
### Added
- \(FM-7606\) enable litmus for concat [\#577](https://github.com/puppetlabs/puppetlabs-concat/pull/577) ([tphoney](https://github.com/tphoney))
### Fixed
- \(FM-8073\) litmus block support [\#580](https://github.com/puppetlabs/puppetlabs-concat/pull/580) ([tphoney](https://github.com/tphoney))
## [5.3.0](https://github.com/puppetlabs/puppetlabs-concat/tree/5.3.0) (2019-02-20)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-concat/compare/5.2.0...5.3.0)
### Added
- \(MODULES-8138\) - Addition of support for SLES 15 [\#545](https://github.com/puppetlabs/puppetlabs-concat/pull/545) ([david22swan](https://github.com/david22swan))
### Fixed
- \(FM-7725\) - Remove OSX testing/support for concat [\#561](https://github.com/puppetlabs/puppetlabs-concat/pull/561) ([lionce](https://github.com/lionce))
- pdksync - \(FM-7655\) Fix rubygems-update for ruby \< 2.3 [\#550](https://github.com/puppetlabs/puppetlabs-concat/pull/550) ([tphoney](https://github.com/tphoney))
## [5.2.0](https://github.com/puppetlabs/puppetlabs-concat/tree/5.2.0) (2018-12-10)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-concat/compare/5.1.0...5.2.0)
### Added
- \(FM-7339\) - Add i18n implementation [\#537](https://github.com/puppetlabs/puppetlabs-concat/pull/537) ([eimlav](https://github.com/eimlav))
- \(FM-7341\) - Added REFERENCE.md and updated documentation [\#536](https://github.com/puppetlabs/puppetlabs-concat/pull/536) ([eimlav](https://github.com/eimlav))
- \(MODULES-5124\) Add support for JSON arrays [\#519](https://github.com/puppetlabs/puppetlabs-concat/pull/519) ([johanfleury](https://github.com/johanfleury))
### Fixed
- \(FM-7581\) - Fix CI failures for Windows 2016 and 10 Enterprise [\#540](https://github.com/puppetlabs/puppetlabs-concat/pull/540) ([eimlav](https://github.com/eimlav))
- \(MODULES-8287\) - Fix fomat=\>'yaml' allowing only hashes [\#535](https://github.com/puppetlabs/puppetlabs-concat/pull/535) ([eimlav](https://github.com/eimlav))
- \(FM-7513\) - Removing Windows 2016-core from our support matrix [\#534](https://github.com/puppetlabs/puppetlabs-concat/pull/534) ([pmcmaw](https://github.com/pmcmaw))
- \(MODULES-8088\) - newline\_spec.rb test expectation update [\#531](https://github.com/puppetlabs/puppetlabs-concat/pull/531) ([lionce](https://github.com/lionce))
- \(MODULES-7717\) ensure\_newline uses unix line ending on windows [\#517](https://github.com/puppetlabs/puppetlabs-concat/pull/517) ([tkishel](https://github.com/tkishel))
## [5.1.0](https://github.com/puppetlabs/puppetlabs-concat/tree/5.1.0) (2018-10-03)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-concat/compare/5.0.0...5.1.0)
### Added
- pdksync - \(FM-7392\) - Puppet 6 Testing Changes [\#525](https://github.com/puppetlabs/puppetlabs-concat/pull/525) ([pmcmaw](https://github.com/pmcmaw))
- pdksync - \(MODULES-6805\) metadata.json shows support for puppet 6 [\#524](https://github.com/puppetlabs/puppetlabs-concat/pull/524) ([tphoney](https://github.com/tphoney))
- pdksync - \(MODULES-7658\) use beaker4 in puppet-module-gems [\#518](https://github.com/puppetlabs/puppetlabs-concat/pull/518) ([tphoney](https://github.com/tphoney))
## [5.0.0](https://github.com/puppetlabs/puppetlabs-concat/tree/5.0.0) (2018-08-24)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-concat/compare/4.2.1...5.0.0)
### Changed
- \[FM-6954\] Removal of scientific linux 5 and debian 7 [\#508](https://github.com/puppetlabs/puppetlabs-concat/pull/508) ([david22swan](https://github.com/david22swan))
### Added
- \(FM-7206\) Update concat to support Ubuntu 18.04 [\#510](https://github.com/puppetlabs/puppetlabs-concat/pull/510) ([david22swan](https://github.com/david22swan))
### Fixed
- Handle concat\_file source when not an array [\#493](https://github.com/puppetlabs/puppetlabs-concat/pull/493) ([vicinus](https://github.com/vicinus))
## 4.2.1
[Full Changelog](https://github.com/puppetlabs/puppetlabs-concat/compare/4.2.0...4.2.1)
### Fixed
- \(MODULES-6817\) noop =\> false for concat\_file [\#492](https://github.com/puppetlabs/puppetlabs-concat/pull/492) ([hunner](https://github.com/hunner))
## Supported Release 4.2.0
### Summary
This release introduces the conversion of the module to use PDK 1.3.2, along with the addition of rubocop with associated fixes.
#### Changed
- All changes in this release are for enabling rubocop, alongside the module then being converted over to the PDK.
## Supported Releases 4.1.1
### Summary
This release is to update the formatting of the module, rubocop having been run for all ruby files and been set to run automatically on all future commits.
#### Changed
- Rubocop has been implemented.
- SLES 10, Windows 2003 R2 and OSX 10.9 removed as supported.
- OSX 10.10 and 10.11 added as supported.
## Supported Releases 4.1.0
### Summary
This release is a rollup of changes. The most notable change being the addition of the 'format' attribute which allows output in JSON and YAML formats, and the 'force' attribute which if true forces a merge of duplicate keys for these formats.
#### Features
- Format and force attributes added.
- Deprecated is_string in favour of puppet language.
- End of Life Ubuntu releases removed as supported.
- Debian 9 added and Debian 6 removed as supported.
#### Bugfixes
- (MODULES-4359) Fix native types so they can be used directly.
- Update to tests to handle errors containing quote marks.
- Update to tests to follow rspec-puppet pattern.
## Supported Releases 4.0.1
### Summary
This is a small release that updates regex in a test due to changes made in Puppet.
#### Bugfixes
- (MODULES-5085) Ensure that replace test handles qoutes in change message
## Supported Releases 3.0.0 & 4.0.0
### Summary
This double release adds new Puppet 4 data types. The 3.0.0 release is fully backwards compatible to
existing Puppet 4 configurations and provides you with [deprecation warnings](https://github.com/puppetlabs/puppetlabs-stdlib#deprecation) for every argument that
will not work as expected with the final 4.0.0 release. See the [stdlib docs](https://github.com/puppetlabs/puppetlabs-stdlib#validate_legacy) for an in-depth discussion of this.
If you're still running Puppet 3, remain on the latest puppetlabs-concat 2.x release for now, and see the documentation to [upgrade to Puppet 4](https://docs.puppet.com/puppet/4.6/reference/upgrade_major_pre.html).
#### Added
- puppet-strings documentation
- Puppet 4 data types and deprecation warnings
#### Changed
- stdlib dependency changed to 4.13.1
- supported Puppet version changed to 4.7.
## Supported Release 2.2.1
### Summary
This is a backwards compatible bugfix release.
#### Bugfixes
- (MODULES-4350) Makes :path the namevar for concat_file
- (MODULES-4351) Prevents the :order parameter from accepting arbitrary values in concat_file
- (MODULES-4352) Restricts the :replace parameter to values accepted by file
- (MODULES-4474) Drops auto requirement of fragments
- (MODULES-3900) Improves error messages in concat::fragment
- Uses the whole fragment title when sorting
## Supported Release 2.2.0
### Summary
This release includes support for Debian 8 and Ubuntu 16.04 in addition to numerous bugfixes.
#### Features
- Adds Debian 8 support
- Adds Ubuntu 16.04 support
#### Bugfixes
- Fixes the stdlib lower dependency.
- (MODULES-3027) Fixes escaping the '*' character in tag creation.
- (MODULES-3097) Fixes fragment sorting by alpha
- Correctly propagates 'validate_cmd' parameter to generated file resource
- Correctly escapes disallowed characters in fragment tag creation
- (MODULES-3332) Correct the target path validation
- (MODULES-3463) Properly passes metaparams to generated resource
## Supported Release 2.1.0
### Summary
This is a re-release of concat as a resource type. This release also includes new features and bugfixes on top of the previously YANKED 2.0.1 release.
#### Features
- Adds the show_diff property.
- Adds the selinux related file params.
- Allows integer UID/GID values to be passed into `$owner` and `$group`
#### Bugfixes
- Adds a workaround to PUP-1963: generated resources never receiving dependency edges.
- Fixes occassional failure to find directory environment.
## Supported Release 1.2.5
### Summary
Small release for support of newer PE versions. This increments the version of PE in the metadata.json file.
## 2015-07-21 - Supported Release 1.2.4
### Summary
This release includes some ruby path and lint fixes.
#### Bugfixes
- Use correct ruby path with PE and AIO
- Lint fixes
- Use correct ruby path on FreeBSD
- Test fixes
## 2015-06-02 - Supported Release 2.0.1 [YANKED]
### Summary
This is a bugfix release.
#### Bugfixes
- Fixes dependency graphing with concurrent modification of the same file.
- Fixes handling fragment target.
- Fixes the defaulted force behavior to handle empty concats correctly.
## 2015-06-02 - Supported Release 1.2.3
### Summary
This release includes a README fix to document correct behavior of fragment target parameter.
#### Bugfixes
- README Fix to correctly document how a fragment $target param should work.
## 2015-05-12 - Supported Release 2.0.0 [YANKED]
### Summary
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.
#### Features
- Re-implementation of concat to use native Type and Providers.
#### Bugfixes
- Fixes a bug in alpha ordering of fragments.
## 2015-05-12 - Supported Release 1.2.2
### Summary
This release includes a bugfix.
#### Bugfixes
- Fixes a bug introduced by MODULES-1700, in handling default retrieval of fragment backup parameter.
## 2015-04-14 - Supported Release 1.2.1
### Summary
This release includes bugfixes, test improvements, and a rewritten README.
#### Bugfixes
- Verifies existence of $is_pe before using it.
- Adds validation for $order param to not allow restricted characters.
- Sets the group id on Fragments for versions of Facter that contain the $gid fact.
- Sets the script group to 0 if the script is owned by root.
- Explicitly sets script and concat directories to the same owner and group.
- Re-adds support for fragment backup, so that static compiler can work with filebucket (MODULES-1700).
## 2015-02-17 - Supported Release 1.2.0
### Summary
This release includes a number of bugfixes and adds support for running a validation command when using puppet >= 3.5.0.
#### Features
- Support running a validation command for Puppet >= 3.5.0
#### Bugfixes
- Reset poisoned defaults from Exec
- Use concatfragments.rb on AIX since it doesn't support print0
- Make sure ruby is in the path for PE (MODULES-1456)
- Fix missing method for check_is_owned_by for windows (MODULES-1764)
- Fix sort by numeric
## 2014-10-28 - Supported Release 1.1.2
### Summary
This release includes bugfixes and test improvements. The module was tested against SLES10 and SLES12 and found to work against those platforms with no module improvements. Metadata was updated to include those as supported platforms.
#### Bugfixes
- newline didn't work for Windows and Solaris. This has been fixed.
- Install certs on Windows for acceptance tests
- Update tests to work with strict variables (no module updates were required)
- Update tests to work on Windows
- Fix typo in CHANGELOG.md
## 2014-09-10 - Supported Release 1.1.1
### Summary
This is a bugfix release, and the first supported release of the 1.1.x series.
#### Bugfixes
- Make the `$order` parameter default to a string and be validated as an integer
or a string
- Use the ruby script on Solaris to not break Sol10 support
- Add quotes to the ruby script location for Windows
- Fix typos in README.md
- Make regex in concat::setup case-insensitive to make it work on Windows
- Make sure concat fragments are always replaced
- Fix validation to allow `$backup` to be a boolean
- Remove dependency on stdlib 4.x
- Fix for lack of idempotency with `ensure => 'absent'`
- Fix tests and spec_helper
- Synchronized files for more consistency across modules via modulesync
## 2014-05-14 - Release 1.1.0
### Summary
This release is primarily a bugfix release since 1.1.0-rc1.
#### Features
- Improved testing, with tests moved to beaker
#### Bugfixes
- No longer attempts to set fragment owner and mode on Windows
- Fix numeric sorting
- Fix incorrect quoting
- Fix newlines
## 2014-01-03 - Release 1.1.0-rc1
### Summary
This release of concat was 90% written by Joshua Hoblitt, and the module team
would like to thank him for the huge amount of work he put into this release.
This module deprecates a bunch of old parameters and usage patterns, modernizes
much of the manifest code, simplifies a whole bunch of logic and makes
improvements to almost all parts of the module.
The other major feature is windows support, courtesy of luisfdez, with an
alternative version of the concat bash script in ruby. We've attempted to
ensure that there are no backwards incompatible changes, all users of 1.0.0
should be able to use 1.1.0 without any failures, but you may find deprecation
warnings and we'll be aggressively moving for a 2.0 to remove those too.
For further information on deprecations, please read:
-https://github.com/puppetlabs/puppetlabs-concat/blob/master/README.md#api-deprecations
+https://github.com/puppetlabs/puppetlabs-concat/blob/main/README.md#api-deprecations
#### Removed
- Puppet 0.24 support.
- Filebucket backup of all file resources except the target concatenated file.
- Default owner/user/group values.
- Purging of long unused /usr/local/bin/concatfragments.sh
### Features
- Windows support via a ruby version of the concat bash script.
- Huge amount of acceptance testing work added.
- Documentation (README) completely rewritten.
- New parameters in concat:
- `ensure`: Controls if the file should be present/absent at all.
- Remove requirement to include concat::setup in manifests.
- Made `gnu` parameter deprecated.
- Added parameter validation.
### Bugfixes
- Ensure concat::setup runs before concat::fragment in all cases.
- Pluginsync references updated for modern Puppet.
- Fix incorrect group parameter.
- Use $owner instead of $id to avoid confusion with $::id
- Compatibility fixes for Puppet 2.7/ruby 1.8.7
- Use LC_ALL=C instead of LANG=C
- Always exec the concatfragments script as root when running as root.
- Syntax and other cleanup changes.
## 2014-06-25 - Supported Release 1.0.4
### Summary
This release has test fixes.
#### Features
- Added test support for OSX.
#### Bugfixes
#### Known bugs
* Not supported on Windows.
## 2014-06-04 - Release 1.0.3
### Summary
This release adds compatibility for PE3.3 and fixes tests.
#### Features
- Added test support for Ubuntu Trusty.
#### Bugfixes
#### Known bugs
*Not supported on Windows.
## 2014-03-04 - Supported Release 1.0.2
### Summary
This is a supported release. No functional changes were made from 1.0.1.
#### Features
- Huge amount of tests backported from 1.1.
- Documentation rewrite.
#### Bugfixes
#### Known Bugs
* Not supported on Windows.
## 2014-02-12 - 1.0.1
### Summary
Minor bugfixes for sorting of fragments and ordering of resources.
#### Bugfixes
- LANG => C replaced with LC_ALL => C to reduce spurious recreation of
fragments.
- Corrected pluginsync documentation.
- Ensure concat::setup always runs before fragments.
## 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` and `content` 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
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1a9fb3a..9c171f9 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,271 +1,271 @@
# Contributing to Puppet modules
So you want to contribute to a Puppet module: Great! Below are some instructions to get you started doing
that very thing while setting expectations around code quality as well as a few tips for making the
process as easy as possible.
### Table of Contents
1. [Getting Started](#getting-started)
1. [Commit Checklist](#commit-checklist)
1. [Submission](#submission)
1. [More about commits](#more-about-commits)
1. [Testing](#testing)
- [Running Tests](#running-tests)
- [Writing Tests](#writing-tests)
1. [Get Help](#get-help)
## Getting Started
- Fork the module repository on GitHub and clone to your workspace
- Make your changes!
## Commit Checklist
### The Basics
- [x] my commit is a single logical unit of work
- [x] I have checked for unnecessary whitespace with "git diff --check"
- [x] my commit does not include commented out code or unneeded files
### The Content
- [x] my commit includes tests for the bug I fixed or feature I added
- [x] my commit includes appropriate documentation changes if it is introducing a new feature or changing existing functionality
- [x] my code passes existing test suites
### The Commit Message
- [x] the first line of my commit message includes:
- [x] an issue number (if applicable), e.g. "(MODULES-xxxx) This is the first line"
- [x] a short description (50 characters is the soft limit, excluding ticket number(s))
- [x] the body of my commit message:
- [x] is meaningful
- [x] uses the imperative, present tense: "change", not "changed" or "changes"
- [x] includes motivation for the change, and contrasts its implementation with the previous behavior
## Submission
### Pre-requisites
- Make sure you have a [GitHub account](https://github.com/join)
- [Create a ticket](https://tickets.puppet.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppet.com/browse/) you are patching for.
### Push and PR
- Push your changes to your fork
- [Open a Pull Request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) against the repository in the puppetlabs organization
## More about commits
1. Make separate commits for logically separate changes.
Please break your commits down into logically consistent units
which include new or changed tests relevant to the rest of the
change. The goal of doing this is to make the diff easier to
read for whoever is reviewing your code. In general, the easier
your diff is to read, the more likely someone will be happy to
review it and get it into the code base.
If you are going to refactor a piece of code, please do so as a
separate commit from your feature or bug fix changes.
We also really appreciate changes that include tests to make
sure the bug is not re-introduced, and that the feature is not
accidentally broken.
Describe the technical detail of the change(s). If your
description starts to get too long, that is a good sign that you
probably need to split up your commit into more finely grained
pieces.
Commits which plainly describe the things which help
reviewers check the patch and future developers understand the
code are much more likely to be merged in with a minimum of
bike-shedding or requested changes. Ideally, the commit message
would include information, and be in a form suitable for
inclusion in the release notes for the version of Puppet that
includes them.
Please also check that you are not introducing any trailing
whitespace or other "whitespace errors". You can do this by
running "git diff --check" on your changes before you commit.
2. Sending your patches
To submit your changes via a GitHub pull request, we _highly_
recommend that you have them on a topic branch, instead of
- directly on "master".
+ directly on "main".
It makes things much easier to keep track of, especially if
you decide to work on another thing before your first change
is merged in.
GitHub has some pretty good
[general documentation](http://help.github.com/) on using
their site. They also have documentation on
[creating pull requests](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).
In general, after pushing your topic branch up to your
repository on GitHub, you can switch to the branch in the
GitHub UI and click "Pull Request" towards the top of the page
in order to open a pull request.
3. Update the related JIRA issue.
If there is a JIRA issue associated with the change you
submitted, then you should update the ticket to include the
location of your branch, along with any other commentary you
may wish to make.
# Testing
## Getting Started
Our Puppet modules provide [`Gemfile`](./Gemfile)s, which can tell a Ruby package manager such as [bundler](http://bundler.io/) what Ruby packages,
or Gems, are required to build, develop, and test this software.
Please make sure you have [bundler installed](http://bundler.io/#getting-started) on your system, and then use it to
install all dependencies needed for this project in the project root by running
```shell
% bundle install --path .bundle/gems
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Using rake (10.1.0)
Using builder (3.2.2)
-- 8><-- many more --><8 --
Using rspec-system-puppet (2.2.0)
Using serverspec (0.6.3)
Using rspec-system-serverspec (1.0.0)
Using bundler (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
```
NOTE: some systems may require you to run this command with sudo.
If you already have those gems installed, make sure they are up-to-date:
```shell
% bundle update
```
## Running Tests
With all dependencies in place and up-to-date, run the tests:
### Unit Tests
```shell
% bundle exec rake spec
```
This executes all the [rspec tests](http://rspec-puppet.com/) in the directories defined [here](https://github.com/puppetlabs/puppetlabs_spec_helper/blob/699d9fbca1d2489bff1736bb254bb7b7edb32c74/lib/puppetlabs_spec_helper/rake_tasks.rb#L17) and so on.
rspec tests may have the same kind of dependencies as the module they are testing. Although the module defines these dependencies in its [metadata.json](./metadata.json),
rspec tests define them in [.fixtures.yml](./fixtures.yml).
### Acceptance Tests
Some Puppet modules also come with acceptance tests, which use [beaker][]. These tests spin up a virtual machine under
[VirtualBox](https://www.virtualbox.org/), controlled with [Vagrant](http://www.vagrantup.com/), to simulate scripted test
scenarios. In order to run these, you need both Virtualbox and Vagrant installed on your system.
Run the tests by issuing the following command
```shell
% bundle exec rake spec_clean
% bundle exec rspec spec/acceptance
```
This will now download a pre-fabricated image configured in the [default node-set](./spec/acceptance/nodesets/default.yml),
install Puppet, copy this module, and install its dependencies per [spec/spec_helper_acceptance.rb](./spec/spec_helper_acceptance.rb)
and then run all the tests under [spec/acceptance](./spec/acceptance).
## Writing Tests
### Unit Tests
When writing unit tests for Puppet, [rspec-puppet][] is your best friend. It provides tons of helper methods for testing your manifests against a
catalog (e.g. contain_file, contain_package, with_params, etc). It would be ridiculous to try and top rspec-puppet's [documentation][rspec-puppet_docs]
but here's a tiny sample:
Sample manifest:
```puppet
file { "a test file":
ensure => present,
path => "/etc/sample",
}
```
Sample test:
```ruby
it 'does a thing' do
expect(subject).to contain_file("a test file").with({:path => "/etc/sample"})
end
```
### Acceptance Tests
Writing acceptance tests for Puppet involves [beaker][] and its cousin [beaker-rspec][]. A common pattern for acceptance tests is to create a test manifest, apply it
twice to check for idempotency or errors, then run expectations.
```ruby
it 'does an end-to-end thing' do
pp = <<-EOF
file { 'a test file':
ensure => present,
path => "/etc/sample",
content => "test string",
}
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
end
describe file("/etc/sample") do
it { is_expected.to contain "test string" }
end
```
# If you have commit access to the repository
Even if you have commit access to the repository, you still need to go through the process above, and have someone else review and merge
in your changes. The rule is that **all changes must be reviewed by a project developer that did not write the code to ensure that
all changes go through a code review process.**
The record of someone performing the merge is the record that they performed the code review. Again, this should be someone other than the author of the topic branch.
# Get Help
### On the web
* [Puppet help messageboard](http://puppet.com/community/get-help)
* [Writing tests](https://docs.puppet.com/guides/module_guides/bgtm.html#step-three-module-testing)
* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
### On chat
* Slack (slack.puppet.com) #forge-modules, #puppet-dev, #windows, #voxpupuli
* IRC (freenode) #puppet-dev, #voxpupuli
[rspec-puppet]: http://rspec-puppet.com/
[rspec-puppet_docs]: http://rspec-puppet.com/documentation/
[beaker]: https://github.com/puppetlabs/beaker
[beaker-rspec]: https://github.com/puppetlabs/beaker-rspec
diff --git a/HISTORY.md b/HISTORY.md
index abbf1bd..4f43806 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,405 +1,405 @@
## 4.2.1
[Full Changelog](https://github.com/puppetlabs/puppetlabs-concat/compare/4.2.0...4.2.1)
### Fixed
- \(MODULES-6817\) noop =\> false for concat\_file [\#492](https://github.com/puppetlabs/puppetlabs-concat/pull/492) ([hunner](https://github.com/hunner))
## Supported Release 4.2.0
### Summary
This release introduces the conversion of the module to use PDK 1.3.2, along with the addition of rubocop with associated fixes.
#### Changed
- All changes in this release are for enabling rubocop, alongside the module then being converted over to the PDK.
## Supported Releases 4.1.1
### Summary
This release is to update the formatting of the module, rubocop having been run for all ruby files and been set to run automatically on all future commits.
#### Changed
- Rubocop has been implemented.
- SLES 10, Windows 2003 R2 and OSX 10.9 removed as supported.
- OSX 10.10 and 10.11 added as supported.
## Supported Releases 4.1.0
### Summary
This release is a rollup of changes. The most notable change being the addition of the 'format' attribute which allows output in JSON and YAML formats, and the 'force' attribute which if true forces a merge of duplicate keys for these formats.
#### Features
- Format and force attributes added.
- Deprecated is_string in favour of puppet language.
- End of Life Ubuntu releases removed as supported.
- Debian 9 added and Debian 6 removed as supported.
#### Bugfixes
- (MODULES-4359) Fix native types so they can be used directly.
- Update to tests to handle errors containing quote marks.
- Update to tests to follow rspec-puppet pattern.
## Supported Releases 4.0.1
### Summary
This is a small release that updates regex in a test due to changes made in Puppet.
#### Bugfixes
- (MODULES-5085) Ensure that replace test handles qoutes in change message
## Supported Releases 3.0.0 & 4.0.0
### Summary
This double release adds new Puppet 4 data types. The 3.0.0 release is fully backwards compatible to
existing Puppet 4 configurations and provides you with [deprecation warnings](https://github.com/puppetlabs/puppetlabs-stdlib#deprecation) for every argument that
will not work as expected with the final 4.0.0 release. See the [stdlib docs](https://github.com/puppetlabs/puppetlabs-stdlib#validate_legacy) for an in-depth discussion of this.
If you're still running Puppet 3, remain on the latest puppetlabs-concat 2.x release for now, and see the documentation to [upgrade to Puppet 4](https://docs.puppet.com/puppet/4.6/reference/upgrade_major_pre.html).
#### Added
- puppet-strings documentation
- Puppet 4 data types and deprecation warnings
#### Changed
- stdlib dependency changed to 4.13.1
- supported Puppet version changed to 4.7.
## Supported Release 2.2.1
### Summary
This is a backwards compatible bugfix release.
#### Bugfixes
- (MODULES-4350) Makes :path the namevar for concat_file
- (MODULES-4351) Prevents the :order parameter from accepting arbitrary values in concat_file
- (MODULES-4352) Restricts the :replace parameter to values accepted by file
- (MODULES-4474) Drops auto requirement of fragments
- (MODULES-3900) Improves error messages in concat::fragment
- Uses the whole fragment title when sorting
## Supported Release 2.2.0
### Summary
This release includes support for Debian 8 and Ubuntu 16.04 in addition to numerous bugfixes.
#### Features
- Adds Debian 8 support
- Adds Ubuntu 16.04 support
#### Bugfixes
- Fixes the stdlib lower dependency.
- (MODULES-3027) Fixes escaping the '*' character in tag creation.
- (MODULES-3097) Fixes fragment sorting by alpha
- Correctly propagates 'validate_cmd' parameter to generated file resource
- Correctly escapes disallowed characters in fragment tag creation
- (MODULES-3332) Correct the target path validation
- (MODULES-3463) Properly passes metaparams to generated resource
## Supported Release 2.1.0
### Summary
This is a re-release of concat as a resource type. This release also includes new features and bugfixes on top of the previously YANKED 2.0.1 release.
#### Features
- Adds the show_diff property.
- Adds the selinux related file params.
- Allows integer UID/GID values to be passed into `$owner` and `$group`
#### Bugfixes
- Adds a workaround to PUP-1963: generated resources never receiving dependency edges.
- Fixes occassional failure to find directory environment.
## Supported Release 1.2.5
### Summary
Small release for support of newer PE versions. This increments the version of PE in the metadata.json file.
## 2015-07-21 - Supported Release 1.2.4
### Summary
This release includes some ruby path and lint fixes.
#### Bugfixes
- Use correct ruby path with PE and AIO
- Lint fixes
- Use correct ruby path on FreeBSD
- Test fixes
## 2015-06-02 - Supported Release 2.0.1 [YANKED]
### Summary
This is a bugfix release.
#### Bugfixes
- Fixes dependency graphing with concurrent modification of the same file.
- Fixes handling fragment target.
- Fixes the defaulted force behavior to handle empty concats correctly.
## 2015-06-02 - Supported Release 1.2.3
### Summary
This release includes a README fix to document correct behavior of fragment target parameter.
#### Bugfixes
- README Fix to correctly document how a fragment $target param should work.
## 2015-05-12 - Supported Release 2.0.0 [YANKED]
### Summary
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.
#### Features
- Re-implementation of concat to use native Type and Providers.
#### Bugfixes
- Fixes a bug in alpha ordering of fragments.
## 2015-05-12 - Supported Release 1.2.2
### Summary
This release includes a bugfix.
#### Bugfixes
- Fixes a bug introduced by MODULES-1700, in handling default retrieval of fragment backup parameter.
## 2015-04-14 - Supported Release 1.2.1
### Summary
This release includes bugfixes, test improvements, and a rewritten README.
#### Bugfixes
- Verifies existence of $is_pe before using it.
- Adds validation for $order param to not allow restricted characters.
- Sets the group id on Fragments for versions of Facter that contain the $gid fact.
- Sets the script group to 0 if the script is owned by root.
- Explicitly sets script and concat directories to the same owner and group.
- Re-adds support for fragment backup, so that static compiler can work with filebucket (MODULES-1700).
## 2015-02-17 - Supported Release 1.2.0
### Summary
This release includes a number of bugfixes and adds support for running a validation command when using puppet >= 3.5.0.
#### Features
- Support running a validation command for Puppet >= 3.5.0
#### Bugfixes
- Reset poisoned defaults from Exec
- Use concatfragments.rb on AIX since it doesn't support print0
- Make sure ruby is in the path for PE (MODULES-1456)
- Fix missing method for check_is_owned_by for windows (MODULES-1764)
- Fix sort by numeric
## 2014-10-28 - Supported Release 1.1.2
### Summary
This release includes bugfixes and test improvements. The module was tested against SLES10 and SLES12 and found to work against those platforms with no module improvements. Metadata was updated to include those as supported platforms.
#### Bugfixes
- newline didn't work for Windows and Solaris. This has been fixed.
- Install certs on Windows for acceptance tests
- Update tests to work with strict variables (no module updates were required)
- Update tests to work on Windows
- Fix typo in CHANGELOG.md
## 2014-09-10 - Supported Release 1.1.1
### Summary
This is a bugfix release, and the first supported release of the 1.1.x series.
#### Bugfixes
- Make the `$order` parameter default to a string and be validated as an integer
or a string
- Use the ruby script on Solaris to not break Sol10 support
- Add quotes to the ruby script location for Windows
- Fix typos in README.md
- Make regex in concat::setup case-insensitive to make it work on Windows
- Make sure concat fragments are always replaced
- Fix validation to allow `$backup` to be a boolean
- Remove dependency on stdlib 4.x
- Fix for lack of idempotency with `ensure => 'absent'`
- Fix tests and spec_helper
- Synchronized files for more consistency across modules via modulesync
## 2014-05-14 - Release 1.1.0
### Summary
This release is primarily a bugfix release since 1.1.0-rc1.
#### Features
- Improved testing, with tests moved to beaker
#### Bugfixes
- No longer attempts to set fragment owner and mode on Windows
- Fix numeric sorting
- Fix incorrect quoting
- Fix newlines
## 2014-01-03 - Release 1.1.0-rc1
### Summary
This release of concat was 90% written by Joshua Hoblitt, and the module team
would like to thank him for the huge amount of work he put into this release.
This module deprecates a bunch of old parameters and usage patterns, modernizes
much of the manifest code, simplifies a whole bunch of logic and makes
improvements to almost all parts of the module.
The other major feature is windows support, courtesy of luisfdez, with an
alternative version of the concat bash script in ruby. We've attempted to
ensure that there are no backwards incompatible changes, all users of 1.0.0
should be able to use 1.1.0 without any failures, but you may find deprecation
warnings and we'll be aggressively moving for a 2.0 to remove those too.
For further information on deprecations, please read:
-https://github.com/puppetlabs/puppetlabs-concat/blob/master/README.md#api-deprecations
+https://github.com/puppetlabs/puppetlabs-concat/blob/main/README.md#api-deprecations
#### Removed
- Puppet 0.24 support.
- Filebucket backup of all file resources except the target concatenated file.
- Default owner/user/group values.
- Purging of long unused /usr/local/bin/concatfragments.sh
### Features
- Windows support via a ruby version of the concat bash script.
- Huge amount of acceptance testing work added.
- Documentation (README) completely rewritten.
- New parameters in concat:
- `ensure`: Controls if the file should be present/absent at all.
- Remove requirement to include concat::setup in manifests.
- Made `gnu` parameter deprecated.
- Added parameter validation.
### Bugfixes
- Ensure concat::setup runs before concat::fragment in all cases.
- Pluginsync references updated for modern Puppet.
- Fix incorrect group parameter.
- Use $owner instead of $id to avoid confusion with $::id
- Compatibility fixes for Puppet 2.7/ruby 1.8.7
- Use LC_ALL=C instead of LANG=C
- Always exec the concatfragments script as root when running as root.
- Syntax and other cleanup changes.
## 2014-06-25 - Supported Release 1.0.4
### Summary
This release has test fixes.
#### Features
- Added test support for OSX.
#### Bugfixes
#### Known bugs
* Not supported on Windows.
## 2014-06-04 - Release 1.0.3
### Summary
This release adds compatibility for PE3.3 and fixes tests.
#### Features
- Added test support for Ubuntu Trusty.
#### Bugfixes
#### Known bugs
*Not supported on Windows.
## 2014-03-04 - Supported Release 1.0.2
### Summary
This is a supported release. No functional changes were made from 1.0.1.
#### Features
- Huge amount of tests backported from 1.1.
- Documentation rewrite.
#### Bugfixes
#### Known Bugs
* Not supported on Windows.
## 2014-02-12 - 1.0.1
### Summary
Minor bugfixes for sorting of fragments and ordering of resources.
#### Bugfixes
- LANG => C replaced with LC_ALL => C to reduce spurious recreation of
fragments.
- Corrected pluginsync documentation.
- Ensure concat::setup always runs before fragments.
## 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` and `content` 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
diff --git a/README.md b/README.md
index 7a6a03e..242de18 100644
--- a/README.md
+++ b/README.md
@@ -1,171 +1,171 @@
# concat
#### Table of Contents
1. [Overview](#overview)
2. [Module Description - What the module does and why it is useful](#module-description)
* [Beginning with concat](#beginning-with-concat)
4. [Usage - Configuration options and additional functionality](#usage)
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
* [Removed functionality](#removed-functionality)
6. [Limitations - OS compatibility, etc.](#limitations)
7. [Development - Guide for contributing to the module](#development)
## Overview
The concat module lets you construct files from multiple ordered fragments of text.
## Module Description
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.
### Beginning with concat
To start using concat you need to create:
* A concat{} resource for the final file.
* One or more concat::fragment{}s.
A minimal example might be:
~~~
concat { '/tmp/file':
ensure => present,
}
concat::fragment { 'tmpfile':
target => '/tmp/file',
content => 'test contents',
order => '01'
}
~~~
## Usage
### Maintain a list of the major modules on a node
To maintain an motd file that lists the modules on one of your nodes, first create a class to frame up the file:
~~~
class motd {
$motd = '/etc/motd'
concat { $motd:
owner => 'root',
group => 'root',
mode => '0644'
}
concat::fragment { 'motd_header':
target => $motd,
content => "\nPuppet modules on this server:\n\n",
order => '01'
}
# let local users add to the motd by creating a file called
# /etc/motd.local
concat::fragment { 'motd_local':
target => $motd,
source => '/etc/motd.local',
order => '15'
}
}
# let other modules register themselves in the motd
define motd::register (
$content = "",
$order = '10',
) {
if $content == "" {
$body = $name
} else {
$body = $content
}
concat::fragment { "motd_fragment_$name":
target => '/etc/motd',
order => $order,
content => " -- $body\n"
}
}
~~~
Then, in the declarations for each module on the node, add `motd::register{ 'Apache': }` to register the module in the motd.
~~~
class apache {
include apache::install, apache::config, apache::service
motd::register { 'Apache': }
}
~~~
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.
When you're finished, the motd file will look something like this:
~~~
Puppet modules on this server:
-- Apache
-- MySQL
~~~
## Reference
-See [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-concat/blob/master/REFERENCE.md)
+See [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-concat/blob/main/REFERENCE.md)
### Removed functionality
The following functionality existed in previous versions of the concat module, but was removed in version 2.0.0:
Parameters removed from `concat::fragment`:
* `gnu`
* `backup`
* `group`
* `mode`
* `owner`
The `concat::setup` class has also been removed.
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.
## Limitations
This module has been tested on [all PE-supported platforms](https://forge.puppetlabs.com/supported#compat-matrix), and no issues have been identified.
-For an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-concat/blob/master/metadata.json)
+For an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-concat/blob/main/metadata.json)
## Development
Acceptance tests for this module leverage [puppet_litmus](https://github.com/puppetlabs/puppet_litmus).
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).
You can also find a tutorial and walkthrough of using Litmus and the PDK on [YouTube](https://www.youtube.com/watch?v=FYfR7ZEGHoE).
If you run into an issue with this module, or if you would like to request a feature, please [file a ticket](https://tickets.puppetlabs.com/browse/MODULES/).
Every Monday the Puppet IA Content Team has [office hours](https://puppet.com/community/office-hours) in the [Puppet Community Slack](http://slack.puppet.com/), alternating between an EMEA friendly time (1300 UTC) and an Americas friendly time (0900 Pacific, 1700 UTC).
If you have problems getting this module up and running, please [contact Support](http://puppetlabs.com/services/customer-support).
If you submit a change to this module, be sure to regenerate the reference documentation as follows:
```bash
puppet strings generate --format markdown --out REFERENCE.md
```
### Contributors
Richard Pijnenburg ([@Richardp82](http://twitter.com/richardp82))
Joshua Hoblitt ([@jhoblitt](http://twitter.com/jhoblitt))
[More contributors](https://github.com/puppetlabs/puppetlabs-concat/graphs/contributors).
diff --git a/Rakefile b/Rakefile
index d1ab1bc..f8ec754 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,89 +1,88 @@
# frozen_string_literal: true
require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-syntax/tasks/puppet-syntax'
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any?
require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any?
require 'puppet_pot_generator/rake_tasks'
def changelog_user
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil || JSON.load(File.read('metadata.json'))['author']
raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator user:#{returnVal}"
returnVal
end
def changelog_project
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil
returnVal ||= begin
metadata_source = JSON.load(File.read('metadata.json'))['source']
metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})
metadata_source_match && metadata_source_match[1]
end
raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator project:#{returnVal}"
returnVal
end
def changelog_future_release
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version']
raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator future_release:#{returnVal}"
returnVal
end
PuppetLint.configuration.send('disable_relative')
if Bundler.rubygems.find_name('github_changelog_generator').any?
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?
config.user = "#{changelog_user}"
config.project = "#{changelog_project}"
config.future_release = "#{changelog_future_release}"
config.exclude_labels = ['maintenance']
config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."
config.add_pr_wo_labels = true
config.issues = false
- config.merge_prefix = "### UNCATEGORIZED PRS; GO LABEL THEM"
+ config.merge_prefix = "### UNCATEGORIZED PRS; LABEL THEM ON GITHUB"
config.configure_sections = {
"Changed" => {
"prefix" => "### Changed",
"labels" => ["backwards-incompatible"],
},
"Added" => {
"prefix" => "### Added",
- "labels" => ["feature", "enhancement"],
+ "labels" => ["enhancement", "feature"],
},
"Fixed" => {
"prefix" => "### Fixed",
- "labels" => ["bugfix"],
+ "labels" => ["bug", "documentation", "bugfix"],
},
}
end
else
desc 'Generate a Changelog from GitHub'
task :changelog do
raise <= Gem::Version.new('2.2.2')"
+ version: '~> 1.15'
+ condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')"
EOM
end
end
diff --git a/metadata.json b/metadata.json
index 8dbc1cd..ce2934a 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,117 +1,117 @@
{
"name": "puppetlabs-concat",
"version": "6.2.0",
"author": "puppetlabs",
"summary": "Construct files from multiple fragments.",
"license": "Apache-2.0",
"source": "https://github.com/puppetlabs/puppetlabs-concat",
"project_page": "https://github.com/puppetlabs/puppetlabs-concat",
"issues_url": "https://tickets.puppetlabs.com/browse/MODULES",
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.13.1 < 7.0.0"
},
{
"name": "puppetlabs/translate",
"version_requirement": ">= 1.0.0 < 3.0.0"
}
],
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"5",
"6",
"7",
"8"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"5",
"6",
"7",
"8"
]
},
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"5",
"6",
"7"
]
},
{
"operatingsystem": "Scientific",
"operatingsystemrelease": [
"6",
"7"
]
},
{
"operatingsystem": "SLES",
"operatingsystemrelease": [
"11 SP1",
"12",
"15"
]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"8",
"9",
"10"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"14.04",
"16.04",
"18.04",
"20.04"
]
},
{
"operatingsystem": "Solaris",
"operatingsystemrelease": [
"10",
"11"
]
},
{
"operatingsystem": "Windows",
"operatingsystemrelease": [
"2008 R2",
"2012",
"2012 R2",
"2016",
"2012 R2 Core",
"7",
"8.1",
"10"
]
},
{
"operatingsystem": "AIX",
"operatingsystemrelease": [
"5.3",
"6.1",
"7.1"
]
}
],
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 5.5.10 < 7.0.0"
}
],
- "template-url": "https://github.com/puppetlabs/pdk-templates#master",
- "template-ref": "heads/master-0-g9c14433",
- "pdk-version": "1.18.0"
+ "template-url": "https://github.com/puppetlabs/pdk-templates#main",
+ "template-ref": "remotes/origin/main-0-g8f10887",
+ "pdk-version": "1.18.1"
}
diff --git a/readmes/README_ja_JP.md b/readmes/README_ja_JP.md
index b1924f8..fd9667f 100644
--- a/readmes/README_ja_JP.md
+++ b/readmes/README_ja_JP.md
@@ -1,160 +1,160 @@
# concat
#### 目次
1. [概要](#overview)
2. [説明 - モジュールの機能とその有益性](#module-description)
* [concatを開始する](#beginning-with-concat)
4. [使用方法 - 設定オプションと追加機能](#usage)
5. [参考 - モジュールの機能と動作について](#reference)
* [削除した機能](#removed-functionality)
6. [制約事項 - OSの互換性など](#limitations)
7. [開発 - モジュール貢献についてのガイド](#development)
## 概要
concatモジュールでは、複数の順序付きテキストフラグメントからファイルを構築できます。
## モジュールの概要
concatモジュールでは、他のモジュールから`concat::fragment`リソースを収集し、それを単一の`concat` リソースを通じて整合性のあるファイルに並べることができます。
### concatを開始する
concatを開始するには、以下の作成が必要です。
* 最終ファイルのconcat{}リソース。
* 1つ以上のconcat::fragment{}。
最小限の例:
~~~
concat { '/tmp/file':
ensure => present,
}
concat::fragment { 'tmpfile':
target => '/tmp/file',
content => 'test contents',
order => '01'
}
~~~
## 使用方法
### ノードの主要モジュールのリストを維持します
いずれかのノードのモジュールをリストするmotdファイルを維持するには、まずファイルをフレームするクラスを作成します。
~~~
class motd {
$motd = '/etc/motd'
concat { $motd:
owner => 'root',
group => 'root',
mode => '0644'
}
concat::fragment{ 'motd_header':
target => $motd,
content => "\nPuppet modules on this server:\n\n",
order => '01'
}
# let local users add to the motd by creating a file called
# /etc/motd.local
concat::fragment{ 'motd_local':
target => $motd,
source => '/etc/motd.local',
order => '15'
}
}
# let other modules register themselves in the motd
define motd::register($content="", $order='10') {
if $content == "" {
$body = $name
} else {
$body = $content
}
concat::fragment{ "motd_fragment_$name":
target => '/etc/motd',
order => $order,
content => " -- $body\n"
}
}
~~~
次に、ノードの各モジュールの宣言に`motd::register{ 'Apache': }`を追加し、motdのモジュールを登録します。
~~~
class apache {
include apache::install, apache::config, apache::service
motd::register{ 'Apache': }
}
~~~
これらの2つのステップは、インストールされ、登録されたモジュールのリストを/etc/motdファイルに追加します。このファイルは、登録済みモジュールの`include`行を削除しただけであっても最新の状態を保ちます。システム管理者は、/etc/motd.localに書き込むことでリストにテキストを追加できます。
完成したmotdファイルは、以下のようになります。
~~~
Puppet modules on this server:
-- Apache
-- MySQL
~~~
## リファレンス
-[REFERENCE.md](https://github.com/puppetlabs/puppetlabs-concat/blob/master/REFERENCE.md)を参照してください。
+[REFERENCE.md](https://github.com/puppetlabs/puppetlabs-concat/blob/main/REFERENCE.md)を参照してください。
### 削除した機能
次の機能は、concatモジュールの過去のバージョンには存在していましたが、バージョン2.0.0では削除されています。
`concat::fragment`から削除されたパラメータ:
* `gnu`
* `backup`
* `group`
* `mode`
* `owner`
`concat::setup`クラスも削除されました。
バージョン2.0.0以前のconcatでは、`warn`パラメータを`true`、`false`、'yes'、'no'、'on'、または'off'の文字列値に設定すると、モジュールは文字列を対応するブール値に変換していました。concatバージョン2.0.0以降では、`warn_header`パラメータはこれらの値を他の文字列と同じように扱い、ヘッダメッセージの内容として使用します。これを回避するには、`true`および`false`値を文字列ではなくブール値として渡します。
## 制約事項
このモジュールは[PE対応のすべてのプラットフォーム](https://forge.puppetlabs.com/supported#compat-matrix)上でテスト済みであり、問題は発見されていません。
-サポートされているオペレーティングシステムの一覧については、[metadata.json](https://github.com/puppetlabs/puppetlabs-concat/blob/master/metadata.json)を参照してください。
+サポートされているオペレーティングシステムの一覧については、[metadata.json](https://github.com/puppetlabs/puppetlabs-concat/blob/main/metadata.json)を参照してください。
## 開発
Puppet Forge上のPuppetモジュールはオープンプロジェクトであり、その価値を維持するにはコミュニティからの貢献が欠かせません。Puppetが提供する膨大な数のプラットフォームや、無数のハードウェア、ソフトウェア、デプロイ設定に弊社がアクセスすることは不可能です。
弊社は、できるだけ変更に貢献しやすくして、弊社のモジュールがユーザの環境で機能する状態を維持したいと考えています。弊社では、状況を把握できるよう、貢献者に従っていただくべきいくつかのガイドラインを設けています。
詳細については、[モジュール貢献ガイド](https://docs.puppetlabs.com/forge/contributing.html)を参照してください。
### コントリビュータ
Richard Pijnenburg ([@Richardp82](http://twitter.com/richardp82))
Joshua Hoblitt ([@jhoblitt](http://twitter.com/jhoblitt))
[その他のコントリビュータ](https://github.com/puppetlabs/puppetlabs-concat/graphs/contributors)