fix: Allow tangd socket override directory to be managed outside of the role #139
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.
Cause: The role was assuming that the only file being managed in the tangd
socket override directory was the override.conf file for the custom port.
Consequence: The role would delete the directory if there was no custom port
without checking if there were other files in that directory being used to
override tangd settings. This would cause the directory to be recreated
upon subsequent runs, and the role would report a change, and not appear
to be idempotent.
Fix: When adding the override directory for the port override file, do not
change its attributes. Do not delete the directory if there are other files
in it.
Result: The role will co-exist with the tangd socket override files being
managed outside of the role.
Signed-off-by: Rich Megginson rmeggins@redhat.com
Fixes #138