Commit graph

35 commit

作者 SHA1 備註 提交日期
Morgan Haskel
7eb14b7768 Remove shell script
The ruby script works just as well and works on all supported platforms. No need to maintain both.
2015-02-13 13:16:59 -08:00
Toni Schmidbauer
4fc1dfc462 use concatfragments.rb on AIX
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
2014-11-18 13:55:53 +01:00
Geoff Williams
0ce713fd9c fix concat broken on windows due to case sensitive regexp -- made it case insensitive 2014-07-09 13:45:16 +10:00
Luis Fernandez Alvarez
da59390ed2 Add quotes to the ruby script location
Without this patch, if the ruby script is located in a path with
spaces, it will not work.
2014-06-18 09:09:47 +02:00
Joshua Hoblitt
a4abf6f142 enable the ruby concat script on Solaris
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
2014-05-29 12:52:38 -07:00
Lucien Weller
e154e8d8f3 ignore mode an owner on windows 2014-04-04 11:03:25 +02:00
Ashley Penney
7437a68016 Merge pull request #91 from jhoblitt/exec_as_root_when_root
always exec the concatfragments script as root when running as root
2013-11-02 13:14:51 -07:00
Joshua Hoblitt
b6e9b1c693 fix or suppress all lint warnings 2013-11-01 18:52:59 -07:00
Joshua Hoblitt
256e0bdf9f remove usage of resource defaults for file owner/permissions
In addition, the permissions of the fragment directory and files is now fixed and not world readable.
2013-11-01 18:23:24 -07:00
Joshua Hoblitt
7c4f929e42 add deprecation warnings on removed parameters + warn on inclusion of concat::setup 2013-10-30 22:06:02 -07:00
Luis Fernandez Alvarez
b09be245d4 Add Windows support
- 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.
2013-10-25 14:47:03 +02:00
Joshua Hoblitt
2ec19b80f9 remove purging of /usr/local/bin/concatfragments.sh
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.
2013-10-24 09:34:31 -07:00
Joshua Hoblitt
aa0180d69a remove default owner/user and group values
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).
2013-10-24 08:48:37 -07:00
Joshua Hoblitt
4d884d3242 only backup target concat file + remove backup param from concat::fragment
Disable filebucket backup of all file resources except for the the
target file that's being concatenated.
2013-10-23 15:42:44 -07:00
Joshua Hoblitt
4d7a915766 use $owner instead of $id to avoid confusion with $::id 2013-10-23 10:55:05 -07:00
Joshua Hoblitt
86522e1eb2 make class concat::setup a private class 2013-10-23 10:55:05 -07:00
Joshua Hoblitt
cca9401844 remove puppet 0.24 support
Introduction of stdlib functions makes support of puppet < 2.7
impractical.
2013-10-23 10:55:05 -07:00
Joshua Hoblitt
987eaec7ab improve whitespace consistency + remove semicolon resource compression
Per http://docs.puppetlabs.com/guides/style_guide.html#resources
resource compression with the "semicolon syntax" is now considered bad
practice.
2013-10-22 08:54:48 -07:00
Joshua Hoblitt
cdb6d6b007 remove undocumented requirement to include concat::setup in manifest
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.
2013-10-17 15:07:57 -07:00
Aaron Blew
bb16039347 Help message for pluginsync now references the correct section of the config 2013-09-27 00:24:58 -07:00
Ashley Penney
64c278490c Ensure that ::setup runs before ::fragment in all cases. 2013-09-24 17:12:27 -04:00
Mark Chappell
688655eb7b RDoc cleanup 2013-05-10 11:58:02 +02:00
Raphael Lorenzeto
4ec1d5df0d Adding more helpful message for 'pluginsync = true'. 2013-02-24 08:28:19 -03:00
Jan Vansteenkiste
370e60280d Fixes various puppet-lint warnings.
* ./manifests/init.pp - WARNING: ensure found on line but it's not the first attribute on line 222
* ./manifests/setup.pp - WARNING: selector inside resource block on line 34
* ./manifests/fragment.pp - WARNING: case statement without a default case on line 28
2012-08-30 12:33:50 +02:00
Sharif Nassar
21d0d2abf2 Fail with helpful advice if $::concat_basedir is not yet set
Building on the new docs in https://github.com/ripienaar/puppet-concat/pull/20
2012-05-23 14:35:08 -07:00
Gildas Le Nadan
0bbbe320cc add information about concat_basedir and the need for pluginsync = true at least once 2012-05-20 20:24:22 +02:00
Erik Dalén
800bec11ae Style guideline fixes
Comply better with puppet community style guidelines.

Change-Id: Ie1782d266539b1a8f9890b2ade77280011aa22aa
2012-04-24 16:53:20 +02:00
Sharif Nassar
30c96286c9 Fix comments to match actual behavior, clean up old script.
* Zap the old copy of /usr/local/bin/concatfragments.sh.
* Fix comments to point at new location of script.
* Delete trailing whitespace.
2011-12-14 13:45:46 -08:00
Christian G. Warden
7722415753 Fix use of unqualified variable names
Fully qualify $::id, $::puppetversion, and $::concat_basedir.
2011-12-05 16:19:24 -08:00
Peter Meier
b9e33c4e6b finish work for unpriviledged user
To be able to use the module as an unprivileged user we need to
adjust certain things:

* only enforce the run user and group if we are root and can
  actually change the user
* set owner/group of our files and directories to our own user/group
* place the concat script in a location we can write -> use the
  concat dir for that.
2011-06-23 13:57:09 +02:00
Peter Meier
45dfa6984c don't use a hardcoded concatdir
Get the concat base directory from a fact -> makes it useable if
Puppet's :vardir is not /var/lib/puppet/. This fixes problems with
PE and makes the module also useable for puppet runs as
unpriviledged user.
2011-06-23 11:05:43 +02:00
Sharif Nassar
96936d9efb Make sure interesting data in the concatdir is only available to root 2011-06-20 13:31:25 -07:00
Pierre-Yves Ritschard
031bf26128 - make the root group configurable in the concat::setup class for portability
- use sh and not bash
2011-02-03 18:01:36 +00:00
martin f. krafft
af63a0b3eb Parametrize warning message
The concat warn parameter can now be any string (and needs to include
the appropriate commenting character) and will then override the default
(which still gets printed when warn=>true).

Signed-off-by: martin f. krafft <madduck@madduck.net>
2010-10-04 22:46:18 +01:00
R.I.Pienaar
ee1fe7a023 Pull in work from private Subversion repository 2010-05-06 22:55:02 +01:00