users: append the additional groups.

This commit is contained in:
Andrea Dell'Amico 2019-02-14 15:18:21 +01:00
parent e6531ac42c
commit 9cc7c3f2ac
1 changed files with 9 additions and 0 deletions

View File

@ -29,6 +29,15 @@
- item.admin
- ansible_distribution_file_variety == "Debian"
- name: Permit sudo without password
lineinfile:
path: /etc/sudoers
state: present
regexp: '^%{{ deb_users_sudoers_group }}\s'
line: '%{{ deb_users_sudoers_group }} ALL=(ALL) NOPASSWD: ALL'
when: ansible_distribution_file_variety == "Debian"
tags: [ 'users', 'sudo_wheel' ]
- name: Add the admin users to the sudoers group on rh/centos systems
user: name={{ item.login }} groups={{ rh_users_sudoers_group }} append=yes
with_items: '{{ users_system_users | default([]) }}'