mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-10 06:35:27 +01:00
Merge a48d9f1023 into 5f44339fa5
This commit is contained in:
commit
4ba7d22fd7
1 changed files with 3 additions and 1 deletions
|
|
@ -222,6 +222,7 @@ EXAMPLES = r'''
|
|||
import errno
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.ansible.posix.plugins.module_utils.mount import ismount
|
||||
|
|
@ -731,7 +732,8 @@ def _is_same_mount_src(module, src, mountpoint, linux_mounts):
|
|||
not ismount(mountpoint) and
|
||||
not is_bind_mounted(module, linux_mounts, mountpoint)):
|
||||
return False
|
||||
|
||||
# sanitize src
|
||||
src = re.sub(r'(//[^:]+):([^@]+)@', r'\1@', src)
|
||||
# Treat Linux bind mounts
|
||||
if platform.system() == 'Linux' and linux_mounts is not None:
|
||||
# For Linux bind mounts only: the mount command does not return
|
||||
|
|
|
|||
Loading…
Reference in a new issue