Skip to content

Instantly share code, notes, and snippets.

@acsrujan
Created September 12, 2016 09:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acsrujan/1e647a864375c00025e4ca7d53770168 to your computer and use it in GitHub Desktop.
Save acsrujan/1e647a864375c00025e4ca7d53770168 to your computer and use it in GitHub Desktop.
Ansible Playbook to update sudo file on ubuntu with NOPASSWD for all users with 'sudo' permission.
---
#Updates sudo file on ubuntu with NOPASSWD for all users.
- hosts: all
sudo: yes
tasks:
- name: Allow 'sudo' group to have passwordless sudo
lineinfile:
dest: /etc/sudoers
state: present
regexp: '^%sudo'
line: '%sudo ALL=(ALL) NOPASSWD: ALL'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment