diff --git a/doc/progress.md b/doc/progress.md new file mode 100644 index 0000000..76e661d --- /dev/null +++ b/doc/progress.md @@ -0,0 +1,6 @@ +# Check if share works + +```shell +smbclient -L //localhost -U dell +smbclient //localhost/scans -U dell +``` diff --git a/roles/scans/tasks/samba.yml b/roles/scans/tasks/samba.yml index 4d96a24..fd8ca94 100644 --- a/roles/scans/tasks/samba.yml +++ b/roles/scans/tasks/samba.yml @@ -3,6 +3,7 @@ package: name={{ item }} with_items: - samba + - smbclient - name: samba - /etc/smb.conf template: dest=/etc/samba/smb.conf src=smb.conf.j2 owner=root group=root mode=0644 @@ -18,3 +19,10 @@ - name: samba - set smbpasswds shell: "(echo {{ item['smbpasswd'] }}; echo {{ item['smbpasswd'] }}) | smbpasswd -s -a {{ item['name'] }}" 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"