updated samba state

This commit is contained in:
Paul 2022-01-10 17:57:40 +01:00
parent 3a737bf6fa
commit 05bb86ec53
3 changed files with 8 additions and 5 deletions

View File

@ -3,4 +3,4 @@
samba-config: samba-config:
ini_manage.options_present: ini_manage.options_present:
- name: /etc/samba/smb.conf - name: /etc/samba/smb.conf
- sections: {{ samba.config }} - sections: {{ samba.config }}

View File

@ -1,4 +1,6 @@
--- ---
samba: samba:
enabled: true enabled: true
config: {} config:
global:
workgroup: PAULBSD

View File

@ -6,13 +6,14 @@
samba-user-{{ user.name }}: samba-user-{{ user.name }}:
{%- if user.enabled %} {%- if user.enabled %}
pdbedit.managed: pdbedit.managed:
{%- else %}
pdbedit.absent:
{%- endif %}
- name: {{ user.name }} - name: {{ user.name }}
- login: {{ user.name }} - login: {{ user.name }}
- password: "{{ user.password }}" - password: "{{ user.password }}"
- password_hashed: false - password_hashed: false
{%- else %}
pdbedit.absent:
- name: {{ user.name }}
{%- endif %}
- require: - require:
- pkg: samba-pkg - pkg: samba-pkg
{%- endfor %} {%- endfor %}