# This file is managed by Chef.
# Do NOT modify this file directly.

<% @command_aliases.each do |a| -%>
Cmnd_Alias <%= a[:name].upcase %> = <%= a[:command_list].join(', ') %>
<% end -%>

<% @env_keep_add.each do |env_keep| -%>
Defaults    env_keep += "<%= env_keep %>"
<% end -%>

<% @env_keep_subtract.each do |env_keep| -%>
Defaults    env_keep -= "<%= env_keep %>"
<% end -%>

<% @commands.each do |command| -%>
<% if @sudoer %><%= @sudoer %> <%= @host %>=(<%= @runas %>) <%= 'NOEXEC:' if @noexec %><%= 'NOPASSWD:' if @nopasswd %><%= 'SETENV:' if @setenv %><%= command %><% end -%>
<% end -%>

<% unless @defaults.empty? %>
Defaults:<%= @sudoer %> <%= @defaults.join(',') %>
<% end -%>
