summaryrefslogtreecommitdiff
path: root/roles/elevate/media/tasks/samba.yml
blob: 65cc1d1b6dbacac4e86f5a23a637d393e4294b55 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- name: create group for shared access
  group:
    name: share
    gid: "{{ share_gid }}"

- name: create guest user for samba
  user:
    name: share
    uid: "{{ share_uid }}"
    home: /var/lib/share
    group: share
    shell: /bin/false

## TODO: create software raid + lvm -> mount to /srv/smbdata

- name: create directory for shared data
  file:
    state: directory
    path: /srv/smbdata/share
    owner: root
    group: share
    mode: 02775

- name: create directory for read-only nextcloud files
  file:
    state: directory
    path: /srv/smbdata/nextcloud

- name: install samba config
  template:
    src: smb.conf.j2
    dest: /etc/samba/smb.conf
  notify:
    - restart nmbd
    - restart smbd