28 lines
652 B
Plaintext
28 lines
652 B
Plaintext
samba_packages:
|
|
pkg.installed:
|
|
- pkgs:
|
|
- samba
|
|
- samba-common-bin
|
|
|
|
smbd:
|
|
service.running:
|
|
- enable: True
|
|
- watch:
|
|
- file: /etc/samba/smb.conf
|
|
- pkg: samba_packages
|
|
|
|
/etc/samba/smb.conf:
|
|
file.managed:
|
|
- source: 'salt://samba/files/smb.conf.jinja'
|
|
- template: jinja
|
|
- check_cmd: /usr/bin/testparm -d 0 -s
|
|
|
|
#{# generate these with print(hashlib.new('md4', "password".encode('utf-16le')).hexdigest()) #}
|
|
#{% for user, passw in salt.pillar.get('samba:users', {}).items() %}
|
|
#samba_{{user}}:
|
|
# pdbedit.managed:
|
|
# - name: {{user}}
|
|
# - password: {{passw}}
|
|
# - password_hashed: True
|
|
#{% endfor %}
|