Ansible_workstation/tasks/sudo.yml

24 lines
376 B
YAML

---
- name: Install sudo
pacman:
name: sudo
state: present
- name: Configure sudoers
template:
src: files/sudoers
dest: /etc/sudoers
mode: 0440
- name: Create sudo group
group:
name: sudo
state: present
- name: Add local user to sudo group
user:
name: "{{ item }}"
groups: sudo
append: yes
with_items: '{{ deploy_users }}'