diff options
| author | Kumar <kumar@kumardamani.xyz> | 2021-11-23 14:59:08 +0000 |
|---|---|---|
| committer | Kumar Damani <me@kumardamani.net> | 2022-03-25 19:45:25 +0000 |
| commit | a857eb82ec9c4a79ad5e41462e2ab82c2660982e (patch) | |
| tree | 9ca51ddfb551322bd4d2fa3f949fa8898032632d /roles/samba/tasks | |
initial commit
Diffstat (limited to 'roles/samba/tasks')
| -rw-r--r-- | roles/samba/tasks/main.yaml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/roles/samba/tasks/main.yaml b/roles/samba/tasks/main.yaml new file mode 100644 index 0000000..5207ac5 --- /dev/null +++ b/roles/samba/tasks/main.yaml @@ -0,0 +1,29 @@ +# https://pimylifeup.com/raspberry-pi-samba/ +--- + +- name: 'Install required apt packages' + apt: + name: + - 'samba' + - 'samba-common-bin' + state: 'present' + update_cache: true + +- name: 'Copy conf files' + template: + src: 'smb.conf' + dest: '/etc/samba/smb.conf' + mode: '644' + +- name: 'Add Samba user' + expect: + command: 'sudo smbpasswd -a {{ samba_user }}' + responses: + (?i)password: "{{ samba_user_pass }}" + +- name: 'Restart Samba' + systemd: + name: '{{ item }}' + state: 'restarted' + loop: + - 'smbd' |
