paulbsd-salt/states/samba/users.sls
2022-01-25 00:21:11 +01:00

19 lines
430 B
Plaintext

---
{%- from "samba/map.jinja" import samba with context %}
{%- from "samba/map.jinja" import users with context %}
{%- for user in users %}
samba-user-{{ user.name }}:
{%- if user.enabled %}
pdbedit.managed:
- name: {{ user.name }}
- login: {{ user.name }}
- password: "{{ user.password }}"
{%- else %}
pdbedit.absent:
- name: {{ user.name }}
{%- endif %}
- require:
- pkg: samba-pkg
{%- endfor %}