Add samba server progress for scanner
This commit is contained in:
@@ -33,6 +33,17 @@ lxc:
|
||||
- lxc.network.hwaddr = 2e:6d:b6:07:15:01
|
||||
- lxc.pts = 6
|
||||
|
||||
- name: progress
|
||||
revision: "01"
|
||||
template: voidlinux
|
||||
config:
|
||||
- lxc.network.type = veth
|
||||
- lxc.network.hwaddr = 2e:6d:b6:07:19:01
|
||||
- lxc.network.link = br0
|
||||
- lxc.network.flags = up
|
||||
- lxc.pts = 6
|
||||
- lxc.mount.entry = /zv1/daten/Scans /var/lib/lxc/lxc-progress-01/rootfs/mnt/scans none bind,create=dir 0 0
|
||||
|
||||
- name: sojus
|
||||
revision: "01"
|
||||
template: voidlinux
|
||||
|
||||
2
host_vars/progress
Normal file
2
host_vars/progress
Normal file
@@ -0,0 +1,2 @@
|
||||
inventory_hostname: progress.fet.htu.tuwien.ac.at
|
||||
inventory_hostname_short: progress
|
||||
@@ -13,6 +13,7 @@ all:
|
||||
hosts:
|
||||
zyklon:
|
||||
sojus:
|
||||
progress:
|
||||
fet_qemu:
|
||||
hosts:
|
||||
maria-storage:
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
; App name that shows on every page title
|
||||
APP_NAME = FET-Gitea
|
||||
; Change it if you run locally
|
||||
|
||||
4
roles/scans/defaults/main.yml
Normal file
4
roles/scans/defaults/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
samba_users:
|
||||
- name: dell
|
||||
smbpasswd: delloscanner
|
||||
3
roles/scans/handlers/main.yml
Normal file
3
roles/scans/handlers/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: restart samba
|
||||
service: name=smbd enabled=yes state=restarted
|
||||
3
roles/scans/tasks/main.yml
Normal file
3
roles/scans/tasks/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- import_tasks: samba.yml
|
||||
tags: [ samba ]
|
||||
17
roles/scans/tasks/samba.yml
Normal file
17
roles/scans/tasks/samba.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
- name: samba - install
|
||||
package: name={{ item }}
|
||||
with_items:
|
||||
- samba
|
||||
|
||||
- name: samba - /etc/smb.conf
|
||||
template: dest=/etc/smb.conf src=smb.conf.j2 owner=root group=root mode=0644
|
||||
notify: restart samba
|
||||
|
||||
- name: samba - add smb users
|
||||
user: "name={{ item['name'] }} shell=/bin/false"
|
||||
with_items: '{{ samba_users }}'
|
||||
|
||||
- name: samba - set smbpasswds
|
||||
shell: "(echo {{ item['smbpasswd'] }}; echo {{ item['smbpasswd'] }}) | smbpasswd -s -a {{ item['name'] }}"
|
||||
with_items: '{{ samba_users }}'
|
||||
26
roles/scans/templates/smb.conf.j2
Normal file
26
roles/scans/templates/smb.conf.j2
Normal file
@@ -0,0 +1,26 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
[global]
|
||||
|
||||
workgroup = WORKGROUP
|
||||
server string = PROGRESS
|
||||
|
||||
security = user
|
||||
hosts allow = 192.168.86.14
|
||||
|
||||
log file = /var/log/samba/%m.log
|
||||
max log size = 500
|
||||
|
||||
dns proxy = no
|
||||
load printers = no
|
||||
printing = bsd
|
||||
printcap name = /dev/null
|
||||
disable spoolss = yes
|
||||
|
||||
[scans]
|
||||
comment = scans
|
||||
path = /mnt/scans
|
||||
valid users = dell
|
||||
public = no
|
||||
browseable = yes
|
||||
writeable = yes
|
||||
Reference in New Issue
Block a user