Installs Samba client and server for Debian Stretch/Buster.
Samba requires ports 137, 138, 139, 445 to be open to function properly.
Available variables are listed below, along with default values (see defaults/main.yml
):
samba_global_workgroup: WORKGROUP
samba_home_browseable: no
samba_home_read_only: yes
samba_home_create_mask: 0700
samba_home_directory_mask: 0700
samba_home_valid_users: '%S'
samba_shares: [] # functionality to manage share directory
You can add unlimited shared directories. To add a shared directory, you can add variable like:
samba_shares:
- name: example
options: |
create mask = 0777
directory mask = 0777
Something along those lines (at a minimum), and it would output in /etc/samba/smb.conf
:
[example]
create mask = 0777
directory mask = 0777
None.
- hosts: servers
roles:
- { role: aymericdd.samba }
BSD
This role is based on samba role written by Jeff Geerling, author of Ansible for DevOps.
This role was created in 2019 by AymericDD.