2021-02-20 15:58:23 +01:00
|
|
|
---
|
2021-12-14 20:26:49 +01:00
|
|
|
- name: ensure group exist
|
2021-02-20 15:58:23 +01:00
|
|
|
become: yes
|
|
|
|
ansible.builtin.group:
|
|
|
|
name: smb_users
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: configure linux-users
|
|
|
|
become: yes
|
|
|
|
ansible.builtin.user:
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
group: smb_users
|
|
|
|
state: "{{ item.state | default('present') }}"
|
|
|
|
remove: "{{ item.remove_dir | default('false') }}"
|
|
|
|
create_home: no
|
|
|
|
loop: "{{ smb_users }}"
|
|
|
|
no_log: True
|
2021-12-14 20:26:49 +01:00
|
|
|
notify: set samba passwords
|