univention udm_share: change some parameters to type bool

reviewable/pr18780/r1
Tobias Rueetschi 9 years ago
parent 838cbd19c1
commit ac5182db2d

@ -92,11 +92,13 @@ options:
root_squash: root_squash:
required: false required: false
default: '1' default: '1'
choices: [ '0', '1' ]
description: description:
- Modify user ID for root user (root squashing). - Modify user ID for root user (root squashing).
subtree_checking: subtree_checking:
required: false required: false
default: '1' default: '1'
choices: [ '0', '1' ]
description: description:
- Subtree checking. - Subtree checking.
sync: sync:
@ -107,6 +109,7 @@ options:
writeable: writeable:
required: false required: false
default: '1' default: '1'
choices: [ '0', '1' ]
description: description:
- NFS write access. - NFS write access.
sambaBlockSize: sambaBlockSize:
@ -117,11 +120,13 @@ options:
sambaBlockingLocks: sambaBlockingLocks:
required: false required: false
default: '1' default: '1'
choices: [ '0', '1' ]
description: description:
- Blocking locks. - Blocking locks.
sambaBrowseable: sambaBrowseable:
required: false required: false
default: '1' default: '1'
choices: [ '0', '1' ]
description: description:
- Show in Windows network environment. - Show in Windows network environment.
sambaCreateMode: sambaCreateMode:
@ -152,26 +157,31 @@ options:
sambaDosFilemode: sambaDosFilemode:
required: false required: false
default: '0' default: '0'
choices: [ '0', '1' ]
description: description:
- Users with write access may modify permissions. - Users with write access may modify permissions.
sambaFakeOplocks: sambaFakeOplocks:
required: false required: false
default: '0' default: '0'
choices: [ '0', '1' ]
description: description:
- Fake oplocks. - Fake oplocks.
sambaForceCreateMode: sambaForceCreateMode:
required: false required: false
default: '0' default: '0'
choices: [ '0', '1' ]
description: description:
- Force file mode. - Force file mode.
sambaForceDirectoryMode: sambaForceDirectoryMode:
required: false required: false
default: '0' default: '0'
choices: [ '0', '1' ]
description: description:
- Force directory mode. - Force directory mode.
sambaForceDirectorySecurityMode: sambaForceDirectorySecurityMode:
required: false required: false
default: '0' default: '0'
choices: [ '0', '1' ]
description: description:
- Force directory security mode. - Force directory security mode.
sambaForceGroup: sambaForceGroup:
@ -182,6 +192,7 @@ options:
sambaForceSecurityMode: sambaForceSecurityMode:
required: false required: false
default: '0' default: '0'
choices: [ '0', '1' ]
description: description:
- Force security mode. - Force security mode.
sambaForceUser: sambaForceUser:
@ -197,6 +208,7 @@ options:
sambaHideUnreadable: sambaHideUnreadable:
required: false required: false
default: '0' default: '0'
choices: [ '0', '1' ]
description: description:
- Hide unreadable files/directories. - Hide unreadable files/directories.
sambaHostsAllow: sambaHostsAllow:
@ -212,16 +224,19 @@ options:
sambaInheritAcls: sambaInheritAcls:
required: false required: false
default: '1' default: '1'
choices: [ '0', '1' ]
description: description:
- Inherit ACLs. - Inherit ACLs.
sambaInheritOwner: sambaInheritOwner:
required: false required: false
default: '0' default: '0'
choices: [ '0', '1' ]
description: description:
- Create files/directories with the owner of the parent directory. - Create files/directories with the owner of the parent directory.
sambaInheritPermissions: sambaInheritPermissions:
required: false required: false
default: '0' default: '0'
choices: [ '0', '1' ]
description: description:
- Create files/directories with permissions of the parent directory. - Create files/directories with permissions of the parent directory.
sambaInvalidUsers: sambaInvalidUsers:
@ -232,26 +247,31 @@ options:
sambaLevel2Oplocks: sambaLevel2Oplocks:
required: false required: false
default: '1' default: '1'
choices: [ '0', '1' ]
description: description:
- Level 2 oplocks. - Level 2 oplocks.
sambaLocking: sambaLocking:
required: false required: false
default: '1' default: '1'
choices: [ '0', '1' ]
description: description:
- Locking. - Locking.
sambaMSDFSRoot: sambaMSDFSRoot:
required: false required: false
default: '0' default: '0'
choices: [ '0', '1' ]
description: description:
- MSDFS root. - MSDFS root.
sambaNtAclSupport: sambaNtAclSupport:
required: false required: false
default: '1' default: '1'
choices: [ '0', '1' ]
description: description:
- NT ACL support. - NT ACL support.
sambaOplocks: sambaOplocks:
required: false required: false
default: '1' default: '1'
choices: [ '0', '1' ]
description: description:
- Oplocks. - Oplocks.
sambaPostexec: sambaPostexec:
@ -267,6 +287,7 @@ options:
sambaPublic: sambaPublic:
required: false required: false
default: '0' default: '0'
choices: [ '0', '1' ]
description: description:
- Allow anonymous read-only access with a guest user. - Allow anonymous read-only access with a guest user.
sambaSecurityMode: sambaSecurityMode:
@ -297,6 +318,7 @@ options:
sambaWriteable: sambaWriteable:
required: false required: false
default: '1' default: '1'
choices: [ '0', '1' ]
description: description:
- Samba write access. - Samba write access.
nfs_hosts: nfs_hosts:
@ -336,20 +358,20 @@ def main():
default='00755'), default='00755'),
host = dict(type='str', host = dict(type='str',
default=None), default=None),
root_squash = dict(type='str', root_squash = dict(type='bool',
default='1'), default=True),
subtree_checking = dict(type='str', subtree_checking = dict(type='bool',
default='1'), default=True),
sync = dict(type='str', sync = dict(type='str',
default='sync'), default='sync'),
writeable = dict(type='str', writeable = dict(type='bool',
default='1'), default=True),
sambaBlockSize = dict(type='str', sambaBlockSize = dict(type='str',
default=None), default=None),
sambaBlockingLocks = dict(type='str', sambaBlockingLocks = dict(type='bool',
default='1'), default=True),
sambaBrowseable = dict(type='str', sambaBrowseable = dict(type='bool',
default='1'), default=True),
sambaCreateMode = dict(type='str', sambaCreateMode = dict(type='str',
default='0744'), default='0744'),
sambaCscPolicy = dict(type='str', sambaCscPolicy = dict(type='str',
@ -360,56 +382,56 @@ def main():
default='0755'), default='0755'),
sambaDirectorySecurityMode = dict(type='str', sambaDirectorySecurityMode = dict(type='str',
default='0777'), default='0777'),
sambaDosFilemode = dict(type='str', sambaDosFilemode = dict(type='bool',
default='0'), default=False),
sambaFakeOplocks = dict(type='str', sambaFakeOplocks = dict(type='bool',
default='0'), default=False),
sambaForceCreateMode = dict(type='str', sambaForceCreateMode = dict(type='bool',
default='0'), default=False),
sambaForceDirectoryMode = dict(type='str', sambaForceDirectoryMode = dict(type='bool',
default='0'), default=False),
sambaForceDirectorySecurityMode = dict(type='str', sambaForceDirectorySecurityMode = dict(type='bool',
default='0'), default=False),
sambaForceGroup = dict(type='str', sambaForceGroup = dict(type='str',
default=None), default=None),
sambaForceSecurityMode = dict(type='str', sambaForceSecurityMode = dict(type='bool',
default='0'), default=False),
sambaForceUser = dict(type='str', sambaForceUser = dict(type='str',
default=None), default=None),
sambaHideFiles = dict(type='str', sambaHideFiles = dict(type='str',
default=None), default=None),
sambaHideUnreadable = dict(type='str', sambaHideUnreadable = dict(type='bool',
default='0'), default=False),
sambaHostsAllow = dict(type='list', sambaHostsAllow = dict(type='list',
default=[]), default=[]),
sambaHostsDeny = dict(type='list', sambaHostsDeny = dict(type='list',
default=[]), default=[]),
sambaInheritAcls = dict(type='str', sambaInheritAcls = dict(type='bool',
default='1'), default=True),
sambaInheritOwner = dict(type='str', sambaInheritOwner = dict(type='bool',
default='0'), default=False),
sambaInheritPermissions = dict(type='str', sambaInheritPermissions = dict(type='bool',
default='0'), default=False),
sambaInvalidUsers = dict(type='str', sambaInvalidUsers = dict(type='str',
default=None), default=None),
sambaLevel2Oplocks = dict(type='str', sambaLevel2Oplocks = dict(type='bool',
default='1'), default=True),
sambaLocking = dict(type='str', sambaLocking = dict(type='bool',
default='1'), default=True),
sambaMSDFSRoot = dict(type='str', sambaMSDFSRoot = dict(type='bool',
default='0'), default=False),
sambaName = dict(type='str', sambaName = dict(type='str',
default=None), default=None),
sambaNtAclSupport = dict(type='str', sambaNtAclSupport = dict(type='bool',
default='1'), default=True),
sambaOplocks = dict(type='str', sambaOplocks = dict(type='bool',
default='1'), default=True),
sambaPostexec = dict(type='str', sambaPostexec = dict(type='str',
default=None), default=None),
sambaPreexec = dict(type='str', sambaPreexec = dict(type='str',
default=None), default=None),
sambaPublic = dict(type='str', sambaPublic = dict(type='bool',
default='0'), default=False),
sambaSecurityMode = dict(type='str', sambaSecurityMode = dict(type='str',
default='0777'), default='0777'),
sambaStrictLocking = dict(type='str', sambaStrictLocking = dict(type='str',
@ -420,8 +442,8 @@ def main():
default=None), default=None),
sambaWriteList = dict(type='str', sambaWriteList = dict(type='str',
default=None), default=None),
sambaWriteable = dict(type='str', sambaWriteable = dict(type='bool',
default='1'), default=True),
nfs_hosts = dict(type='list', nfs_hosts = dict(type='list',
default=[]), default=[]),
nfsCustomSettings = dict(type='list', nfsCustomSettings = dict(type='list',
@ -457,6 +479,10 @@ def main():
module.params['printablename'] = '{} ({})'.format(name, module.params['host']) module.params['printablename'] = '{} ({})'.format(name, module.params['host'])
for k in obj.keys(): for k in obj.keys():
if module.params[k] == True:
module.params[k] = '1'
elif module.params[k] == False:
module.params[k] = '0'
obj[k] = module.params[k] obj[k] = module.params[k]
diff = obj.diff() diff = obj.diff()

Loading…
Cancel
Save