Add samba server progress for scanner

This commit is contained in:
Daniel A. Maierhofer
2018-09-19 12:08:26 +02:00
parent 77510d7296
commit 4a1088ec2e
10 changed files with 73 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
# {{ ansible_managed }}
; App name that shows on every page title
APP_NAME = FET-Gitea
; Change it if you run locally

View File

@@ -0,0 +1,4 @@
---
samba_users:
- name: dell
smbpasswd: delloscanner

View File

@@ -0,0 +1,3 @@
---
- name: restart samba
service: name=smbd enabled=yes state=restarted

View File

@@ -0,0 +1,3 @@
---
- import_tasks: samba.yml
tags: [ samba ]

View 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 }}'

View 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