Ansible_workstation/tasks/sudo.yml

25 lines
416 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
2018-11-07 09:57:55 +00:00
tags:
- first_deployement
2018-08-22 19:14:04 +00:00
- 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
2018-11-07 09:57:55 +00:00
tags:
- first_deployement
2018-08-22 19:14:04 +00:00
- 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 }}'
2018-11-07 09:57:55 +00:00
tags:
- first_deployement