Add non_unique parameter for group module (#53085)

This commit is contained in:
Gabriel do Nascimento Ribeiro
2019-03-13 16:40:07 -03:00
committed by Sam Doran
parent 0e77eeb205
commit f97a593da5
3 changed files with 48 additions and 1 deletions

View File

@@ -23,6 +23,7 @@
loop:
- ansibullgroup
- ansibullgroup2
- ansibullgroup3
- block:
- name: run tests
@@ -36,3 +37,4 @@
loop:
- ansibullgroup
- ansibullgroup2
- ansibullgroup3

View File

@@ -129,6 +129,22 @@
- not create_group_gid_again is changed
- create_group_gid_again.gid | int == gid.stdout_lines[0] | int
- block:
- name: create a group with a non-unique gid
group:
name: ansibullgroup3
gid: '{{ gid.stdout_lines[0] }}'
non_unique: true
state: present
register: create_group_gid_non_unique
- name: assert create group with a non unique gid
assert:
that:
- create_group_gid_non_unique is changed
- create_group_gid_non_unique.gid | int == gid.stdout_lines[0] | int
when: ansible_facts.system != 'Darwin'
##
## group remove
##