mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 07:05:27 +01:00
Compare commits
2 commits
4ba7d22fd7
...
ceaab99003
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ceaab99003 | ||
|
|
a48d9f1023 |
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