add poweroff and reboot to sudoers file

This commit is contained in:
simon 2022-04-27 09:16:12 +07:00
parent 3e65d1ae07
commit 36081b7e72
Signed by: simon
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 9 additions and 0 deletions

View File

@ -37,3 +37,12 @@
user:
name: "{{ regular_user }}"
shell: /bin/zsh
- name: "sudoers edit"
become: true
lineinfile:
path: /etc/sudoers
line: "{{ item }}"
loop:
- "{{ regular_user }} ALL=NOPASSWD:/sbin/poweroff"
- "{{ regular_user }} ALL=NOPASSWD:/sbin/reboot"