AIX find does not support the print0 option. It's basically the same as on Solaris:
Debug: Executing '/var/lib/puppet/concat/bin/concatfragments.sh -o "/var/lib/puppet/concat/_var_ossec_etc_ossec-agent.conf/fragments.concat.out" -d "/var/lib/puppet/concat/_var_ossec_etc_ossec-agent.conf" -t'
Debug: /Stage[main]/Ossec::Client/Concat[/var/ossec/etc/ossec-agent.conf]/Exec[concat_/var/ossec/etc/ossec-agent.conf]/unless: find: bad option -print0
Error: Illegal name. The given name _ensure does not conform to the naming rule \A((::)?[a-z0-9]w*)(::[a-z0-9]w*)*\z at /etc/puppet/vendor/modules/concat/manifests/fragment.pp:57:5
This is to work around a validation issue that arises under the 3.x future
parser, as proper numeric types have been introduced (ie, not all scalar values
are strings). Users have come to expect to to be able to pass in unquoted
integer values to the order parameter which will fail to validate as a string
when the future parser is enabled.
Per discussion on #174, Solaris 10 does not support the find/xargs
switches that were introduced in that PR (but Solaris 11 does).
+ add a shebang to concatfragments.rb
+ fix linter warnings/errors
Under Puppet 3.5.1 (and possibly earlier versions, too), the validate_string($order)
fails when $order is actaully a numeric type. Apparently there is more strict type
checking now. Can't just change validate_string to a is_numeric check, because it's
fairly common to use strings like '01' for the order parameter, which doesn't pass
the is_numeric test. Additionally, there is nothing saying that $order must be a
number. Ultimately the ordering gets implemented as filesystem directory list
sorting.
The current code doesn't correctly account for an absent with a
path set, incorrectly trying to remove $name instead. Fixing this
raised the issue that fragments left with no ensure will fail when
absent is set as the fragdir is deleted.
As a workaround for this we check the `ensure` parameter from the
concat{} resource with getparam() and then pass that to the fragment
if no specific ensure was passed in. This effectively ensures
fragments inherit their parents ensure status.
Partially reverting the $warn/$warn_message param split from eaf8407 as this
change was unnecessarily API breaking. Instead, we are adding string/bool type
validating to the $warn parameter and deprecation warnings for the usage of
stringified boolean values (eg, 'true', 'on', etc.). In a future major release,
the logic can be simplified to treating all string values as a warning message.
There's no need to allow the ownership/permissions of a fragment to be set as
the concat define sets ownership/permissions on the final aggregated file.
Revert validation of the target param as an absolute path and allow it to be an
arbitrary string. This is so the
concat { <foo>: path => ... }
concat::fragment { ...: target => <foo> }
association may be symbolic as long as concat path param is specified. This
should resolve the symbolic name regression introduced in:
https://github.com/puppetlabs/puppetlabs-concat/commit/eaf84079
- It adds a ruby version of the bash script.
- Refactor setup.pp to include new variables.
- Generalizes command execution according to variables in setup.pp.
The hard coded path of `/usr/local/bin/concatfragments.sh` hasn't been
used for "a long time" so there's no reason to carry the cleanup around
any longer.
The use of $::id to set the default user/owner and group has caused
multiple bugs in the past, is incorrectly used to infer the egid,
introduces a dependency on the `id` fact, and provides no functionally
that can't be accomplished by passing `undef` or not setting the
respective params on the file & exec types.
A possible alternative would be to introduce a dep on the $::gid fact
but that would mean the entire module would depend on a version of
facter than hasn't shipped yet (unworkable) or to add a gid/egid fact
into this module (ugly).
Unless the class `concat::setup` has been manually included into the
manifest before using the `concat` / `concat::fragment` defined types,
the puppet master will generate this warning while compiling the catalog.
Tue Oct 15 14:05:06 -0700 2013 Scope(Concat[/etc/exports]) (warning):
Could not look up qualified variable 'concat::setup::root_group'; class
concat::setup has not been evaluated
The need to `include concat::setup` directly into the manifest has never
been part of the documented API.