update..
This commit is contained in:
@ -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 }}'
|
||||
|
Reference in New Issue
Block a user