Install Samba server.
This role supports 'server', 'client' and 'member' roles.
For clients (default), samba-client
is installed along with some dependencies, but do not prepare mounts or set up any configuration.
For servers, the configuration is done via a smb.conf
template managed by a few variables (see defaults/main.yml
for details).
For domain member servers, the configuration is done via a smb.conf
= krb5.conf
template managed by a few variables (see defaults/main.yml
for details).
You can configure any global option in dict samba_global
, except the workgroup, which is configured in samba_workgroup
.
Any number of shares can be configure in dict samba_shares
. Directories for defined samba shares will be created.
When using Samba's user
security model (default), users in samba_users
will be setup in the samba context, but note you still need to define them at the OS context (ie /etc/passwd
, LDAP, ...).
Note that at least ports 139/tcp and 445/tcp need to be open for servers and clients.
See meta/main.yml
.
See defaults/main.yml
for all options.
- Users need to be available to the OS when using Samba's
user
security model. - Firewall need to be open for ports 139/tcp and 445/tcp.
Example:
- hosts: server
roles:
- {role: samba, samba_role: server}
- Configure samba client.
- Mount samba clients.
Released under the MIT license.
Luis Gracia while at The Rockefeller University: