Skip to content

Commit

Permalink
Modify samba config
Browse files Browse the repository at this point in the history
  • Loading branch information
FuzzyMistborn committed May 10, 2021
1 parent fc268b8 commit 16fab65
Show file tree
Hide file tree
Showing 5 changed files with 566 additions and 575 deletions.
23 changes: 0 additions & 23 deletions files/template-generator.sh

This file was deleted.

9 changes: 9 additions & 0 deletions roles/adonalsium/tasks/main.yml
Expand Up @@ -26,6 +26,15 @@
- { user: "{{ main_username }}", pass: "{{ secret_main_user_pass }}" }
- { user: ansible, pass: "{{ secret_ansible_pass }}" }

- name: Add samba users
user:
name: samba
password: "!"
create_home: no

- name: Add samba user password
shell: "printf '{{ secret_samba_pass }}\n{{ secret_samba_pass }}\n' | smbpasswd -a samba"

- name: Add sudoers file for ansible
copy:
src: sudoer_ansible
Expand Down
4 changes: 3 additions & 1 deletion roles/adonalsium/templates/smb.conf.j2
@@ -1,10 +1,11 @@
## adonalsium samba configuration

[global]
server min protocol = SMB2_02
workgroup = cosmere
server string = adonalsium
security = user
guest ok = yes
guest ok = no
map to guest = bad user

log file = /var/log/samba/%m.log
Expand All @@ -17,5 +18,6 @@
public = yes
writeable = yes
path = /mnt/Media
valid users = samba
force user = {{main_username}}
force group = {{main_username}}
1 change: 1 addition & 0 deletions roles/endowment/tasks/disks.yml
Expand Up @@ -24,6 +24,7 @@
group: "{{ main_username }}"
mode: 0600
content: |
user=samba
password={{secret_samba_pass}}
domain=cosmere
Expand Down

0 comments on commit 16fab65

Please sign in to comment.