Ansible_workstation/tasks/sudo.yml

24 lines
378 B
YAML
Raw Normal View History

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:
name: "{{ item }}"
groups: sudo
2018-08-22 19:14:04 +00:00
append: yes
with_items: '{{ deploy_users }}'