Ansible_workstation/tasks/sudo.yml

24 lines
386 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 deploy user to sudo group
user:
name: "{{ item.username }}"
groups: sudo
append: yes
with_items: '{{ deploy_users }}'