community.general.udm_share – Manage samba shares on a univention corporate server

Note

This plugin is part of the community.general collection (version 1.3.6).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.udm_share.

Synopsis

  • This module allows to manage samba shares on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it.

Requirements

The below requirements are needed on the host that executes this module.

  • Python >= 2.6

Parameters

Parameter Choices/Defaults Comments
directorymode
string
Default:
"00755"
Permissions for the share's root directory.
group
string
Default:
"0"
Directory owner group of the share's root directory.
host
string
Host FQDN (server which provides the share), e.g. {{ ansible_fqdn }}. Required if state=present.
name
string / required
Name
nfs_hosts
list / elements=string
Default:
[]
Only allow access for this host, IP address or network.
nfsCustomSettings
list / elements=string
Default:
[]
Option name in exports file.

aliases: nfs_custom_settings
ou
string / required
Organisational unit, inside the LDAP Base DN.
owner
string
Default:
"0"
Directory owner of the share's root directory.
path
path
Directory on the providing server, e.g. /home. Required if state=present.
root_squash
boolean
    Choices:
  • no
  • yes ←
Modify user ID for root user (root squashing).
sambaBlockingLocks
boolean
    Choices:
  • no
  • yes ←
Blocking locks.

aliases: samba_blocking_locks
sambaBlockSize
string
Blocking size.

aliases: samba_block_size
sambaBrowseable
boolean
    Choices:
  • no
  • yes ←
Show in Windows network environment.

aliases: samba_browsable
sambaCreateMode
string
Default:
"0744"
File mode.

aliases: samba_create_mode
sambaCscPolicy
string
Default:
"manual"
Client-side caching policy.

aliases: samba_csc_policy
sambaCustomSettings
list / elements=string
Default:
[]
Option name in smb.conf and its value.

aliases: samba_custom_settings
sambaDirectoryMode
string
Default:
"0755"
Directory mode.

aliases: samba_directory_mode
sambaDirectorySecurityMode
string
Default:
"0777"
Directory security mode.

aliases: samba_directory_security_mode
sambaDosFilemode
boolean
    Choices:
  • no ←
  • yes
Users with write access may modify permissions.

aliases: samba_dos_filemode
sambaFakeOplocks
boolean
    Choices:
  • no ←
  • yes
Fake oplocks.

aliases: samba_fake_oplocks
sambaForceCreateMode
boolean
    Choices:
  • no ←
  • yes
Force file mode.

aliases: samba_force_create_mode
sambaForceDirectoryMode
boolean
    Choices:
  • no ←
  • yes
Force directory mode.

aliases: samba_force_directory_mode
sambaForceDirectorySecurityMode
boolean
    Choices:
  • no ←
  • yes
Force directory security mode.

aliases: samba_force_directory_security_mode
sambaForceGroup
string
Force group.

aliases: samba_force_group
sambaForceSecurityMode
boolean
    Choices:
  • no ←
  • yes
Force security mode.

aliases: samba_force_security_mode
sambaForceUser
string
Force user.

aliases: samba_force_user
sambaHideFiles
string
Hide files.

aliases: samba_hide_files
sambaHideUnreadable
boolean
    Choices:
  • no ←
  • yes
Hide unreadable files/directories.

aliases: samba_hide_unreadable
sambaHostsAllow
list / elements=string
Default:
[]
Allowed host/network.

aliases: samba_hosts_allow
sambaHostsDeny
list / elements=string
Default:
[]
Denied host/network.

aliases: samba_hosts_deny
sambaInheritAcls
boolean
    Choices:
  • no
  • yes ←
Inherit ACLs.

aliases: samba_inherit_acls
sambaInheritOwner
boolean
    Choices:
  • no ←
  • yes
Create files/directories with the owner of the parent directory.

aliases: samba_inherit_owner
sambaInheritPermissions
boolean
    Choices:
  • no ←
  • yes
Create files/directories with permissions of the parent directory.

aliases: samba_inherit_permissions
sambaInvalidUsers
string
Invalid users or groups.

aliases: samba_invalid_users
sambaLevel2Oplocks
boolean
    Choices:
  • no
  • yes ←
Level 2 oplocks.

aliases: samba_level_2_oplocks
sambaLocking
boolean
    Choices:
  • no
  • yes ←
Locking.

aliases: samba_locking
sambaMSDFSRoot
boolean
    Choices:
  • no ←
  • yes
MSDFS root.

aliases: samba_msdfs_root
sambaName
string
Windows name. Required if state=present.

aliases: samba_name
sambaNtAclSupport
boolean
    Choices:
  • no
  • yes ←
NT ACL support.

aliases: samba_nt_acl_support
sambaOplocks
boolean
    Choices:
  • no
  • yes ←
Oplocks.

aliases: samba_oplocks
sambaPostexec
string
Postexec script.

aliases: samba_postexec
sambaPreexec
string
Preexec script.

aliases: samba_preexec
sambaPublic
boolean
    Choices:
  • no ←
  • yes
Allow anonymous read-only access with a guest user.

aliases: samba_public
sambaSecurityMode
string
Default:
"0777"
Security mode.

aliases: samba_security_mode
sambaStrictLocking
string
Default:
"Auto"
Strict locking.

aliases: samba_strict_locking
sambaValidUsers
string
Valid users or groups.

aliases: samba_valid_users
sambaVFSObjects
string
VFS objects.

aliases: samba_vfs_objects
sambaWriteable
boolean
    Choices:
  • no
  • yes ←
Samba write access.

aliases: samba_writeable
sambaWriteList
string
Restrict write access to these users/groups.

aliases: samba_write_list
state
string
    Choices:
  • present ←
  • absent
Whether the share is present or not.
subtree_checking
boolean
    Choices:
  • no
  • yes ←
Subtree checking.
sync
string
Default:
"sync"
NFS synchronisation.
writeable
boolean
    Choices:
  • no
  • yes ←
NFS write access.

Examples

- name: Create a share named home on the server ucs.example.com with the path /home
  community.general.udm_share:
    name: home
    path: /home
    host: ucs.example.com
    sambaName: Home

Authors

  • Tobias Rüetschi (@keachi)