Ability to run orawls as non-root user #343
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm contributing this changes on behalf of Amdocs Development Ltd.
Add functionality to run orawls with a non-root user.
This will work only with Puppet v3.7.0 or higher so as to use the patch for "exec" resource type which does not switch user if running user & target user are same & does not fail for switch user test.
Following was done so as to have it running with non-root user:
This is done by setting facter for overriding these defaults to custom location where the files will persist till the installation lifecycle:
export FACTER_override_wls_domains_file=/wls_domains.yaml
export FACTER_override_wls_setting_file=/wls_setting.yaml
If no facter is specified, it will be created at default location /etc
For user parameter in "exec" resource types, puppet has provided a patch from v3.7 onwards to validate & check user is root or not & does not fail if user to run with is same as running user which invoked puppet.
So to minimize code changes for all exec resources, for now, orawls can be run by non-root user only with puppet v3.7+.