mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 21:31:26 -07:00
Properly detect is_chroot fact on XFS for non-root (#56899)
Fixes #56437
This commit is contained in:
parent
fca2a4c68b
commit
6e66ea9f78
2 changed files with 4 additions and 0 deletions
|
@ -31,6 +31,8 @@ def is_chroot(module=None):
|
|||
rc, out, err = module.run_command(cmd)
|
||||
if 'btrfs' in out:
|
||||
fs_root_ino = 256
|
||||
elif 'xfs' in out:
|
||||
fs_root_ino = 128
|
||||
|
||||
is_chroot = (my_root.st_ino != fs_root_ino)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue