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

Note

This plugin is part of the community.general collection.

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_custom_settings
string
Default:
[]
Option name in exports file.

aliases: nfsCustomSettings
nfs_hosts
string
Default:
[]
Only allow access for this host, IP address or network.
ou
string / required
Organisational unit, inside the LDAP Base DN.
owner
string
Default:
0
Directory owner of the share's root directory.
path
string
Directory on the providing server, e.g. /home. Required if state=present.
root_squash
string
    Choices:
  • 0
  • 1 ←
Modify user ID for root user (root squashing).
samba_block_size
string
Blocking size.

aliases: sambaBlockSize
samba_blocking_locks
string
    Choices:
  • 0
  • 1 ←
Blocking locks.

aliases: sambaBlockingLocks
samba_browseable
string
    Choices:
  • 0
  • 1 ←
Show in Windows network environment.

aliases: sambaBrowseable
samba_create_mode
string
Default:
"0744"
File mode.

aliases: sambaCreateMode
samba_csc_policy
string
Default:
"manual"
Client-side caching policy.

aliases: sambaCscPolicy
samba_custom_settings
string
Default:
[]
Option name in smb.conf and its value.

aliases: sambaCustomSettings
samba_directory_mode
string
Default:
"0755"
Directory mode.

aliases: sambaDirectoryMode
samba_directory_security_mode
string
Default:
"0777"
Directory security mode.

aliases: sambaDirectorySecurityMode
samba_dos_filemode
string
    Choices:
  • 0 ←
  • 1
Users with write access may modify permissions.

aliases: sambaDosFilemode
samba_fake_oplocks
string
    Choices:
  • 0 ←
  • 1
Fake oplocks.

aliases: sambaFakeOplocks
samba_force_create_mode
string
    Choices:
  • 0 ←
  • 1
Force file mode.

aliases: sambaForceCreateMode
samba_force_directory_mode
string
    Choices:
  • 0 ←
  • 1
Force directory mode.

aliases: sambaForceDirectoryMode
samba_force_directory_security_mode
string
    Choices:
  • 0 ←
  • 1
Force directory security mode.

aliases: sambaForceDirectorySecurityMode
samba_force_group
string
Force group.

aliases: sambaForceGroup
samba_force_security_mode
string
    Choices:
  • 0 ←
  • 1
Force security mode.

aliases: sambaForceSecurityMode
samba_force_user
string
Force user.

aliases: sambaForceUser
samba_hide_files
string
Hide files.

aliases: sambaHideFiles
samba_hide_unreadable
string
    Choices:
  • 0 ←
  • 1
Hide unreadable files/directories.

aliases: sambaHideUnreadable
samba_hosts_allow
string
Default:
[]
Allowed host/network.

aliases: sambaHostsAllow
samba_hosts_deny
string
Default:
[]
Denied host/network.

aliases: sambaHostsDeny
samba_inherit_acls
string
    Choices:
  • 0
  • 1 ←
Inherit ACLs.

aliases: sambaInheritAcls
samba_inherit_owner
string
    Choices:
  • 0 ←
  • 1
Create files/directories with the owner of the parent directory.

aliases: sambaInheritOwner
samba_inherit_permissions
string
    Choices:
  • 0 ←
  • 1
Create files/directories with permissions of the parent directory.

aliases: sambaInheritPermissions
samba_invalid_users
string
Invalid users or groups.

aliases: sambaInvalidUsers
samba_level_2_oplocks
string
    Choices:
  • 0
  • 1 ←
Level 2 oplocks.

aliases: sambaLevel2Oplocks
samba_locking
string
    Choices:
  • 0
  • 1 ←
Locking.

aliases: sambaLocking
samba_msdfs_root
string
    Choices:
  • 0 ←
  • 1
MSDFS root.

aliases: sambaMSDFSRoot
samba_name
string
Windows name. Required if state=present.

aliases: sambaName
samba_nt_acl_support
string
    Choices:
  • 0
  • 1 ←
NT ACL support.

aliases: sambaNtAclSupport
samba_oplocks
string
    Choices:
  • 0
  • 1 ←
Oplocks.

aliases: sambaOplocks
samba_postexec
string
Postexec script.

aliases: sambaPostexec
samba_preexec
string
Preexec script.

aliases: sambaPreexec
samba_public
string
    Choices:
  • 0 ←
  • 1
Allow anonymous read-only access with a guest user.

aliases: sambaPublic
samba_security_mode
string
Default:
"0777"
Security mode.

aliases: sambaSecurityMode
samba_strict_locking
string
Default:
"Auto"
Strict locking.

aliases: sambaStrictLocking
samba_valid_users
string
Valid users or groups.

aliases: sambaValidUsers
samba_vfs_objects
string
VFS objects.

aliases: sambaVFSObjects
samba_write_list
string
Restrict write access to these users/groups.

aliases: sambaWriteList
samba_writeable
string
    Choices:
  • 0
  • 1 ←
Samba write access.

aliases: sambaWriteable
state
string
    Choices:
  • present ←
  • absent
Whether the share is present or not.
subtree_checking
string
    Choices:
  • 0
  • 1 ←
Subtree checking.
sync
string
Default:
"sync"
NFS synchronisation.
writeable
string
    Choices:
  • 0
  • 1 ←
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)