2021-07-12 21:04:06 +02:00
|
|
|
---
|
2021-07-14 21:38:30 +02:00
|
|
|
# file: tasks/groups.yml
|
2021-07-12 21:04:06 +02:00
|
|
|
|
2021-07-14 21:38:30 +02:00
|
|
|
- name: groups - create dns group
|
|
|
|
when: ansible_os_family|lower != "alpine"
|
2021-07-12 21:04:06 +02:00
|
|
|
group: gid="11" name="dns" state="present" system="yes"
|
|
|
|
become: yes
|
|
|
|
|
2021-07-14 21:38:30 +02:00
|
|
|
- name: groups - add me to the dns group
|
|
|
|
when: ansible_os_family|lower != "alpine" and ansible_user_uid != "0"
|
2021-07-12 21:04:06 +02:00
|
|
|
user: name="{{ansible_user_id}}" groups=dns append=yes
|
|
|
|
become: yes
|
2021-07-14 21:38:30 +02:00
|
|
|
|