Created
October 16, 2011 06:31
-
-
Save bryanwb/1290581 to your computer and use it in GitHub Desktop.
Example of a sudoers template with chef
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/sudoers | |
# | |
# Generated by Chef for <%= node[:fqdn] %> | |
Defaults !lecture,tty_tickets,!fqdn | |
# User privilege specification | |
root ALL=(ALL) ALL | |
<% @sudoers_users.each do |user| -%> | |
<%= user %> ALL=(ALL) <%= "NOPASSWD:" if @passwordless %>ALL | |
<% end -%> | |
# Members of the sysadmin group may gain root privileges | |
%sysadmin ALL=(ALL) <%= "NOPASSWD:" if @passwordless %>ALL | |
<% @sudoers_groups.each do |group| -%> | |
# Members of the group '<%= group %>' may gain root privileges | |
%<%= group %> ALL=(ALL) <%= "NOPASSWD:" if @passwordless %>ALL | |
<% end -%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment