diff options
-rw-r--r-- | system/mount.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/system/mount.py b/system/mount.py index 938f683f..59b30175 100644 --- a/system/mount.py +++ b/system/mount.py @@ -353,7 +353,12 @@ def is_bind_mounted(module, dest, src=None, fstype=None): if get_platform().lower() == 'linux': result = mount_pattern.search(arguments[1]) - if len(result.groups()) == 1: + # This is only for LVM and tmpfs mounts + if result is not None and len(result.groups()) == 1: + source = result.group(1) + + if src is None: + # That's for unmounted/absent if arguments[0] == dest: is_mounted = True elif ( @@ -394,6 +399,10 @@ def main(): 'name': module.params['name'] } + # FreeBSD doesn't have any 'default' so set 'rw' instead + if get_platform() == 'FreeBSD': + args['opts'] = 'rw' + if module.params['src'] is not None: args['src'] = module.params['src'] if module.params['fstype'] is not None: |