ansible-role-users/tasks/groups.yml

10 lines
301 B
YAML

- block:
- name: "Create group for user '{{ user.username }}'."
tags: users
ansible.builtin.group:
name: "{{ user.group | default(user.username) }}"
gid: "{{ user.gid | default(omit) }}"
state: present
when:
- user.state | default('present') == 'present'