Fix execute chown and chgrp for symlink #8
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.
Description
Used resource:
exec:
result:
this is symlink:
ls -la main.js lrwxrwxrwx 1 oneadmin oneadmin 29 Apr 7 15:21 main.js -> /var/lib/one/sunstone/main.js
The next step is to run the
chown
command for the file/usr/lib/one/sunstone/public/dist/main.js
, which modifies/var/lib/one/sunstone/main.js
. But next time the puppet will find the given file again. (recursive loop).The resource should change the symlink, not the file that she points to.
Fixes
Use the -h option for chown and chgrp. This option is supported by all operating systems for which support for this module is claimed.