Add samba reboot restart cronjob
This commit is contained in:
6
doc/progress.md
Normal file
6
doc/progress.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Check if share works
|
||||||
|
|
||||||
|
```shell
|
||||||
|
smbclient -L //localhost -U dell
|
||||||
|
smbclient //localhost/scans -U dell
|
||||||
|
```
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- samba
|
- samba
|
||||||
|
- smbclient
|
||||||
|
|
||||||
- name: samba - /etc/smb.conf
|
- name: samba - /etc/smb.conf
|
||||||
template: dest=/etc/samba/smb.conf src=smb.conf.j2 owner=root group=root mode=0644
|
template: dest=/etc/samba/smb.conf src=smb.conf.j2 owner=root group=root mode=0644
|
||||||
@@ -18,3 +19,10 @@
|
|||||||
- name: samba - set smbpasswds
|
- name: samba - set smbpasswds
|
||||||
shell: "(echo {{ item['smbpasswd'] }}; echo {{ item['smbpasswd'] }}) | smbpasswd -s -a {{ item['name'] }}"
|
shell: "(echo {{ item['smbpasswd'] }}; echo {{ item['smbpasswd'] }}) | smbpasswd -s -a {{ item['name'] }}"
|
||||||
with_items: '{{ samba_users }}'
|
with_items: '{{ samba_users }}'
|
||||||
|
changed_when: False
|
||||||
|
|
||||||
|
- name: samba - add cronjob for fixing IPv4
|
||||||
|
cron:
|
||||||
|
name: samba reboot restart
|
||||||
|
special_time : reboot
|
||||||
|
job: "sleep 15 && sv restart smbd"
|
||||||
|
|||||||
Reference in New Issue
Block a user