fix: files and templates in nested directories are not placed correctly#89
Merged
richm merged 1 commit intolinux-system-roles:mainfrom Apr 29, 2025
Merged
Conversation
Contributor
Author
|
Fixes #84 |
8f4766f to
eeaf69f
Compare
Cause: If the user specified a file or template source within a nested directory, the role was using the whole path and not just the basename for the name of the destination file. Consequence: The role was trying to place files and templates in the same directory structure on the destination, which is not supported by systemd. Fix: Ensure the basename of the given file or template is used to construct the path to the destination. Result: The role works even when the source files and templates are in nested directories. NOTE: If you were relying on the old broken code to make deeply nested systemd and drop-in directories on the destination, and that somehow was working, it will no longer be working. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
eeaf69f to
fc19dfb
Compare
Contributor
Author
|
[citest] |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #89 +/- ##
====================================
Coverage ? 0
====================================
Files ? 0
Lines ? 0
Branches ? 0
====================================
Hits ? 0
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: If the user specified a file or template source within a nested
directory, the role was using the whole path and not just the basename
for the name of the destination file.
Consequence: The role was trying to place files and templates in the
same directory structure on the destination, which is not supported
by systemd.
Fix: Ensure the basename of the given file or template is used to
construct the path to the destination.
Result: The role works even when the source files and templates are
in nested directories.
NOTE: If you were relying on the old broken code to make deeply nested
systemd and drop-in directories on the destination, and that somehow
was working, it will no longer be working.
Signed-off-by: Rich Megginson rmeggins@redhat.com