Difference between revisions of "Enable passwordless sudo for a specific user"
Jump to navigation
Jump to search
Line 16: | Line 16: | ||
validate: 'visudo -cf %s' | validate: 'visudo -cf %s' | ||
</pre> | </pre> | ||
+ | |||
+ | |||
+ | == Activities == | ||
+ | * Understand order rules are applied and impact: https://vim.fandom.com/wiki/Set_Vim_as_your_default_editor_for_Unix | ||
+ | |||
Revision as of 11:09, 11 December 2019
Passwordless sudo using Ansible
#!/usr/bin/env ansible-playbook - hosts: YOUR_MACHINE tasks: - lineinfile: path: /etc/sudoers state: present regexp: '^%sudo' line: '%sudo ALL=(ALL) NOPASSWD: ALL' validate: 'visudo -cf %s'
Activities
- Understand order rules are applied and impact: https://vim.fandom.com/wiki/Set_Vim_as_your_default_editor_for_Unix
See also
Advertising: