summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2016-09-26 12:09:16 -0700
committerToshio Kuratomi <a.badger@gmail.com>2016-09-26 12:09:16 -0700
commit0bc993be83927ef6c5f11a2f68813608a5b8fc1b (patch)
tree8cf3b79e5c44447065c993447abb3dad7781c2ae
parenteef7b779a84626e4a14e685ab8e648ebe7def4cf (diff)
downloadansible-modules-core-0bc993be83927ef6c5f11a2f68813608a5b8fc1b.tar.gz
Manually backport the freebsd and lvm fixes to mount.py
-rw-r--r--system/mount.py11
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: