Test system users and groups.

This commit is contained in:
Matt Clay 2020-02-27 21:09:34 -08:00
parent b6c2056ea2
commit 21475aa83b
2 changed files with 26 additions and 0 deletions

View file

@ -314,3 +314,16 @@
state: absent
# only applicable to Linux, limit further to CentOS where 'lgroupadd' is installed
when: ansible_distribution == 'CentOS'
# create system group
- name: remove group
group:
name: ansibullgroup
state: absent
- name: create system group
group:
name: ansibullgroup
state: present
system: yes

View file

@ -55,6 +55,19 @@
- user_test0_1 is not changed
- '"ansibulluser" in user_names.stdout_lines'
# create system user
- name: remove user
user:
name: ansibulluser
state: absent
- name: create system user
user:
name: ansibulluser
state: present
system: yes
# test adding user with uid
# https://github.com/ansible/ansible/issues/62969
- name: remove the test user