2022-05-09 08:17:07 +00:00
|
|
|
---
|
|
|
|
|
2023-02-12 14:08:40 +00:00
|
|
|
- name: "Create unix group with random gid: {{ unix_group.key }}"
|
|
|
|
ansible.builtin.group:
|
2022-05-09 08:17:07 +00:00
|
|
|
name: "{{ unix_group.key }}"
|
|
|
|
state: "{{ unix_group.value.state | default('present') }}"
|
2023-02-08 17:25:07 +00:00
|
|
|
when: unix_group.value.gid is not defined or unix_group.value.gid is defined and unix_group.value.gid | length <= 0
|
2022-05-09 08:17:07 +00:00
|
|
|
|
2023-02-12 14:08:40 +00:00
|
|
|
- name: "Create unix group with pre-defined gid: {{ unix_group.key }}"
|
|
|
|
ansible.builtin.group:
|
2022-05-09 08:17:07 +00:00
|
|
|
name: "{{ unix_group.key }}"
|
|
|
|
gid: "{{ unix_group.value.gid }}"
|
|
|
|
state: "{{ unix_group.value.state | default('present') }}"
|
2023-02-08 17:25:07 +00:00
|
|
|
when: unix_group.value.gid is defined and unix_group.value.gid | length > 0
|