Add samba server progress for scanner
This commit is contained in:
@@ -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