Ansible_workstation/tasks/sudo.yml

19 lines
320 B
YAML
Raw Normal View History

2018-08-22 19:14:04 +00:00
---
- 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 deploy user to sudo group
2018-08-22 19:16:56 +00:00
user:
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 }}'