|
|
@ -271,7 +271,7 @@ def main():
|
|
|
|
sambaMSDFSRoot = dict(type='str',
|
|
|
|
sambaMSDFSRoot = dict(type='str',
|
|
|
|
default='0'),
|
|
|
|
default='0'),
|
|
|
|
sambaName = dict(type='str',
|
|
|
|
sambaName = dict(type='str',
|
|
|
|
default=''),
|
|
|
|
default=None),
|
|
|
|
sambaNtAclSupport = dict(type='str',
|
|
|
|
sambaNtAclSupport = dict(type='str',
|
|
|
|
default='1'),
|
|
|
|
default='1'),
|
|
|
|
sambaOplocks = dict(type='str',
|
|
|
|
sambaOplocks = dict(type='str',
|
|
|
@ -329,15 +329,18 @@ def main():
|
|
|
|
obj[k] = module.params[k]
|
|
|
|
obj[k] = module.params[k]
|
|
|
|
|
|
|
|
|
|
|
|
diff = obj.diff()
|
|
|
|
diff = obj.diff()
|
|
|
|
for k in obj.keys():
|
|
|
|
if exists:
|
|
|
|
if obj.hasChanged(k):
|
|
|
|
for k in obj.keys():
|
|
|
|
changed=True
|
|
|
|
if obj.hasChanged(k):
|
|
|
|
|
|
|
|
changed=True
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
changed=True
|
|
|
|
if not module.check_mode:
|
|
|
|
if not module.check_mode:
|
|
|
|
if not exists:
|
|
|
|
if not exists:
|
|
|
|
obj.create()
|
|
|
|
obj.create()
|
|
|
|
elif changed:
|
|
|
|
elif changed:
|
|
|
|
obj.modify()
|
|
|
|
obj.modify()
|
|
|
|
except BaseException as e:
|
|
|
|
except Exception as e:
|
|
|
|
module.fail_json(
|
|
|
|
module.fail_json(
|
|
|
|
msg='Creating/editing share {} in {} failed: {}'.format(name, container, e)
|
|
|
|
msg='Creating/editing share {} in {} failed: {}'.format(name, container, e)
|
|
|
|
)
|
|
|
|
)
|
|
|
|