linux-system-roles / storage

Ansible role for linux storage management
https://linux-system-roles.github.io/storage/
MIT License
101 stars 58 forks source link

fix: use stat.pw_name, stat.gr_name instead of owner, group #377

Closed richm closed 1 year ago

richm commented 1 year ago

Cause: The fields stat.owner and stat.group do not exist.

Consequence: The crypttab was always being set to owner/group root.

Fix: Use the correct fields stat.pw_name and stat.gr_name.

Result: Owner and group of crypttab are preserved.

See https://docs.ansible.com/ansible/2.9/modules/stat_module.html#return-stat/gr_name

Signed-off-by: Rich Megginson rmeggins@redhat.com

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -1.68% :warning:

Comparison is base (12915cb) 13.67% compared to head (ef7778e) 12.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #377 +/- ## ========================================== - Coverage 13.67% 12.00% -1.68% ========================================== Files 8 8 Lines 1733 1733 Branches 79 0 -79 ========================================== - Hits 237 208 -29 - Misses 1496 1525 +29 ``` | [Flag](https://app.codecov.io/gh/linux-system-roles/storage/pull/377/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles) | Coverage Δ | | |---|---|---| | [sanity](https://app.codecov.io/gh/linux-system-roles/storage/pull/377/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles#carryforward-flags-in-the-pull-request-comment) to find out more. [see 1 file with indirect coverage changes](https://app.codecov.io/gh/linux-system-roles/storage/pull/377/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.