playbook and rol sudoers
This commit is contained in:
parent
5482ea1f3a
commit
75a6bdf201
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
|
||||
- hosts: '{{ ip_addr }}'
|
||||
become: yes
|
||||
become_method: sudo
|
||||
gather_facts: yes
|
||||
|
||||
tasks:
|
||||
|
||||
- name: "[CONFIG SUDOERS] Config sudoers"
|
||||
import_role:
|
||||
name: config-sudoers
|
|
@ -0,0 +1,15 @@
|
|||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# configure sudo for sysadmin group
|
||||
# paso1 - add sysadmin group to sudoers
|
||||
- name: Add sysadmin group to sudoers
|
||||
file:
|
||||
path: /etc/sudoers.d/vn
|
||||
state: touch
|
||||
mode: u=rw,g=r,o=r
|
||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# paso2 - add a line to /etc/sudoers.d/vn file
|
||||
- name: add a line to /etc/sudoers.d/vn file
|
||||
lineinfile:
|
||||
path: "/etc/sudoers.d/vn"
|
||||
line: "%sysadmin ALL=(ALL) NOPASSWD: ALL"
|
||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
Loading…
Reference in New Issue