blob: 67a511de6ad296b6ed338e746841c44bb1a70e02 (
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
37
38
|
---
- name: install samba
apt:
name:
- samba
state: present
- name: create group for shared access
group:
name: share
gid: "{{ elevate_media_share_gid }}"
- name: create guest user for samba
user:
name: share
uid: "{{ elevate_media_share_uid }}"
home: /var/lib/share
group: share
shell: /bin/false
- name: prepare storage volume for samba share
vars:
storage_volume: "{{ elevate_media_share_storage | combine({'dest': '/srv/_samba_/share', 'mode': '02775', 'owner': 'root', 'group': 'share'}) }}"
include_role:
name: "storage/{{ elevate_media_share_storage.type }}/volume"
- name: create directory for read-only nextcloud file bind-mounts
file:
state: directory
path: /srv/_samba_/nextcloud
- name: install samba config
template:
src: smb.conf.j2
dest: /etc/samba/smb.conf
notify:
- restart nmbd
- restart smbd
|