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

@@ -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
View File

@@ -0,0 +1,2 @@
inventory_hostname: progress.fet.htu.tuwien.ac.at
inventory_hostname_short: progress

View File

@@ -13,6 +13,7 @@ all:
hosts:
zyklon:
sojus:
progress:
fet_qemu:
hosts:
maria-storage:

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

View File

@@ -55,6 +55,10 @@
roles:
- borg_client
- hosts: progress
roles:
- scans
#- hosts: ruby
# become: True
# roles: