From 05bb86ec5397671c7cc8b8dfa4473b3704519ba1 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 10 Jan 2022 17:57:40 +0100 Subject: [PATCH] updated samba state --- states/samba/config.sls | 2 +- states/samba/defaults.yaml | 4 +++- states/samba/users.sls | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/states/samba/config.sls b/states/samba/config.sls index d0c3d81..2f44ebf 100644 --- a/states/samba/config.sls +++ b/states/samba/config.sls @@ -3,4 +3,4 @@ samba-config: ini_manage.options_present: - name: /etc/samba/smb.conf - - sections: {{ samba.config }} + - sections: {{ samba.config }} diff --git a/states/samba/defaults.yaml b/states/samba/defaults.yaml index 38d17e5..167f71d 100644 --- a/states/samba/defaults.yaml +++ b/states/samba/defaults.yaml @@ -1,4 +1,6 @@ --- samba: enabled: true - config: {} + config: + global: + workgroup: PAULBSD diff --git a/states/samba/users.sls b/states/samba/users.sls index 929375e..c5c5108 100644 --- a/states/samba/users.sls +++ b/states/samba/users.sls @@ -6,13 +6,14 @@ samba-user-{{ user.name }}: {%- if user.enabled %} pdbedit.managed: -{%- else %} - pdbedit.absent: -{%- endif %} - name: {{ user.name }} - login: {{ user.name }} - password: "{{ user.password }}" - password_hashed: false +{%- else %} + pdbedit.absent: + - name: {{ user.name }} +{%- endif %} - require: - pkg: samba-pkg {%- endfor %}