Removal from groups does not work as intended.
This commit is contained in:
parent
61dd0e231f
commit
cba04cbd9b
|
@ -7,17 +7,34 @@
|
||||||
when: users_system_users is defined
|
when: users_system_users is defined
|
||||||
tags: [ 'services', 'users' ]
|
tags: [ 'services', 'users' ]
|
||||||
|
|
||||||
|
#- block:
|
||||||
|
# - name: Remove selected users to the limited sudoers group
|
||||||
|
# user: name={{ item.login }} groups=''
|
||||||
|
# with_items: '{{ users_system_users | default([]) }}'
|
||||||
|
# when: not item.limited_sudoers_user
|
||||||
|
#
|
||||||
|
# when:
|
||||||
|
# - users_system_users is defined
|
||||||
|
# - item.limited_sudoers_user is defined
|
||||||
|
# tags: [ 'services', 'users' ]
|
||||||
|
#
|
||||||
|
#- block:
|
||||||
|
# - name: Remove additional users to the limited sudoers group
|
||||||
|
# user: name={{ item.login }} groups=''
|
||||||
|
# with_items: '{{ users_system_users_adjunct }}'
|
||||||
|
# when: not item.limited_sudoers_user
|
||||||
|
#
|
||||||
|
# when:
|
||||||
|
# - users_system_users_adjunct is defined
|
||||||
|
# - item.limited_sudoers_user is defined
|
||||||
|
# tags: [ 'services', 'users' ]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Add selected users to the limited sudoers group
|
- name: Add selected users to the limited sudoers group
|
||||||
user: name={{ item.login }} groups={{ service_sudoers_group }} append=yes
|
user: name={{ item.login }} groups={{ service_sudoers_group }} append=yes
|
||||||
with_items: '{{ users_system_users | default([]) }}'
|
with_items: '{{ users_system_users | default([]) }}'
|
||||||
when: item.limited_sudoers_user
|
when: item.limited_sudoers_user
|
||||||
|
|
||||||
- name: Remove selected users to the limited sudoers group
|
|
||||||
user: name={{ item.login }} groups={{ service_sudoers_group }} append=yes
|
|
||||||
with_items: '{{ users_system_users | default([]) }}'
|
|
||||||
when: not item.limited_sudoers_user
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- users_system_users is defined
|
- users_system_users is defined
|
||||||
- item.limited_sudoers_user is defined
|
- item.limited_sudoers_user is defined
|
||||||
|
@ -29,12 +46,8 @@
|
||||||
with_items: '{{ users_system_users_adjunct }}'
|
with_items: '{{ users_system_users_adjunct }}'
|
||||||
when: item.limited_sudoers_user
|
when: item.limited_sudoers_user
|
||||||
|
|
||||||
- name: Remove additional users to the limited sudoers group
|
|
||||||
user: name={{ item.login }} groups={{ service_sudoers_group }} append=yes
|
|
||||||
with_items: '{{ users_system_users_adjunct }}'
|
|
||||||
when: not item.limited_sudoers_user
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- users_system_users_adjunct is defined
|
- users_system_users_adjunct is defined
|
||||||
- item.limited_sudoers_user is defined
|
- item.limited_sudoers_user is defined
|
||||||
tags: [ 'services', 'users' ]
|
tags: [ 'services', 'users' ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue