ansible-share-access/tasks/create_user.yml
2020-08-07 19:24:28 +02:00

25 lines
555 B
YAML

---
- name: Ensure group {{ user.group }} is present
group:
name: "{{ user.group }}"
state: present
when: user.group is defined
- name: Ensure user {{ user.username }} is present
user:
name: "{{ user.username }}"
groups:
- "{{ user.group }}"
home: "{{ user.home }}"
create_home: yes
system: no
when: user.group is defined
- name: Ensure user {{ user.username }} is present
user:
name: "{{ user.username }}"
home: "{{ user.home }}"
create_home: yes
system: no
when: user.group is not defined