You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I attempt to deploy defaults with a group ( specifically !requiretty ) the settings do not take. I patched the module to work on my puppet master and the code below to allow using defaults with group.
diff --git a/modules/sudo/templates/sudoers.erb b/modules/sudo/templates/sudoers.erb
index e852b31..9902fda 100644
--- a/modules/sudo/templates/sudoers.erb
+++ b/modules/sudo/templates/sudoers.erb
@@ -13,7 +13,11 @@ Cmnd_Alias <%= @sane_name.upcase %>_CMNDS = <%= @cmnds.class == Array ? @cmnds.
<% if not @defaults.empty? then -%>
+<% if @users then -%>
Defaults:<%= @sane_name.upcase %>_USERS <%= @defaults.class == Array ? @defaults.join(", ") : @defaults %>
+<% else -%>
+Defaults:%<%= @group %> <%= @defaults.class == Array ? @defaults.join(", ") : @defaults %>
+<% end -%>
<% end -%>
<% if @users then -%>
The text was updated successfully, but these errors were encountered:
While it doesn't look as if this issue is accurate to the file as it currently exists, I think this is something that bears discussion. There are some defaults that seem like they should be applied per user (requiretty, in my case), and some that seem like the might be better per command (log_output, for example). Perhaps it should be a further setting that determines if the default should be applied to the user/group, as in @jonathandelanders example, or to the command, as it currently is?
First off, Fantastic module..
When I attempt to deploy defaults with a group ( specifically !requiretty ) the settings do not take. I patched the module to work on my puppet master and the code below to allow using defaults with group.
The text was updated successfully, but these errors were encountered: