2018-08-22 19:14:04 +00:00
|
|
|
---
|
|
|
|
- name: Install sudo
|
|
|
|
pacman:
|
|
|
|
name: sudo
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Configure sudoers
|
2018-08-22 19:16:56 +00:00
|
|
|
template:
|
|
|
|
src: files/sudoers
|
2018-08-22 19:14:04 +00:00
|
|
|
dest: /etc/sudoers
|
|
|
|
mode: 0440
|
|
|
|
|
|
|
|
- name: Create sudo group
|
2018-08-22 19:16:56 +00:00
|
|
|
group:
|
2018-08-22 19:14:04 +00:00
|
|
|
name: sudo
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Add local user to sudo group
|
2018-08-22 19:16:56 +00:00
|
|
|
user:
|
2018-08-23 12:29:20 +00:00
|
|
|
name: "{{ item.username }}"
|
2018-08-22 19:16:56 +00:00
|
|
|
groups: sudo
|
2018-08-22 19:14:04 +00:00
|
|
|
append: yes
|
2018-08-22 19:19:32 +00:00
|
|
|
with_items: '{{ deploy_users }}'
|