32 lines
575 B
YAML
32 lines
575 B
YAML
- name: Install Samba
|
|
apt:
|
|
name: samba
|
|
state: present
|
|
|
|
- name: Ensure smbd is running & enabled.
|
|
service:
|
|
name: smbd
|
|
state: started
|
|
enabled: true
|
|
|
|
- name: Create family account for share access
|
|
user:
|
|
name: lambroek
|
|
state: present
|
|
create_home: false
|
|
groups:
|
|
- data
|
|
password: "{{ lambroek_password }}"
|
|
shell: /sbin/nologin
|
|
|
|
# TODO run "smbpasswd -a lambroek"
|
|
|
|
- name: Copy over smb config file
|
|
copy:
|
|
src: smb.conf
|
|
dest: /etc/samba/smb.conf
|
|
owner: root
|
|
group: root
|
|
mode: '644'
|
|
notify: restart-smbd
|