diff options
author | Peter Meier <peter.meier@immerda.ch> | 2011-06-23 13:37:03 +0200 |
---|---|---|
committer | Peter Meier <peter.meier@immerda.ch> | 2011-06-23 13:57:09 +0200 |
commit | b9e33c4e6b42c9e35e0db6c1494dafc4a4c5f07e (patch) | |
tree | 0e1eee50dbc91fef9335d1ad6a5f65206ad551da /manifests/setup.pp | |
parent | 45dfa6984cb185afc85c183152fbc6c2837e1345 (diff) |
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.
Diffstat (limited to 'manifests/setup.pp')
-rw-r--r-- | manifests/setup.pp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/manifests/setup.pp b/manifests/setup.pp index 5b3ad26..53092ab 100644 --- a/manifests/setup.pp +++ b/manifests/setup.pp @@ -13,12 +13,15 @@ # # It also copies out the concatfragments.sh file to /usr/local/bin class concat::setup { - $root_group = 0 + $root_group = $id ? { + root => 0, + default => $id + } $concatdir = $concat_basedir $majorversion = regsubst($puppetversion, '^[0-9]+[.]([0-9]+)[.][0-9]+$', '\1') - file{"/usr/local/bin/concatfragments.sh": - owner => root, + file{"${concatdir}/bin/concatfragments.sh": + owner => $id, group => $root_group, mode => 755, source => $majorversion ? { @@ -26,9 +29,9 @@ class concat::setup { default => "puppet:///modules/concat/concatfragments.sh" }; - $concatdir: + [ $concatdir, "${concatdir}/bin" ]: ensure => directory, - owner => root, + owner => $id, group => $root_group, mode => '0750'; } |