This commit is contained in:
2022-02-28 16:15:45 +01:00
parent 4d0d3b0d69
commit 3699bcc0e1
7 changed files with 261 additions and 7 deletions

View File

@ -48,6 +48,25 @@
- samba-user
- system-user
- name: (samba_user.yml) Ensure samba users exists with given group membership
user:
name: '{{ item.name }}'
state: present
uid: '{{ item.user_id | default(omit) }}'
#group: '{{ item.0.name | default(omit) }}'
groups: "{{ item.groups|join(', ') }}"
password: "{{ item.password | password_hash('sha512') }}"
update_password: on_create
append: yes
loop: "{{ samba_user }}"
loop_control:
label: '{{ item.name }}'
tags:
- samba-server
- samba-user
- system-user
- name: (samba-user.yml) Check if samba user exists
shell: pdbedit -w -L | awk -F":" '{ print $1 }' | grep '{{ item.name }}'

View File

@ -44,6 +44,22 @@
; netbios name = FILE
netbios name = {{ samba_netbios_name|default('FILE') }}
{% if samba_server_min_protocol is defined and samba_server_min_protocol|length > 0 %}
# This setting controls the minimum protocol version that the server will allow
# the client to use. Normally this option should not be set as the automatic
# negotiation phase in the SMB protocol takes care of choosing the appropriate
# protocol unless you have legacy clients which are SMB1 capable only.
#
# See Related command: server max protocol for a full list of available protocols.
#
# Default: server min protocol = SMB2_02
#
# Example: server min protocol = NT1
#
server min protocol = {{ samba_server_min_protocol }}
{% endif %}
#### Networking ####