Skip to content

Commit

Permalink
use sudo::defaults in rhel9 template
Browse files Browse the repository at this point in the history
  • Loading branch information
saz committed May 13, 2024
1 parent e5b821d commit 632ba9b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
Enum['absent','password','nopassword'] $wheel_config = $sudo::params::wheel_config,
Optional[Array[String[1]]] $sudoreplay_discard = undef,
Hash $configs = {},
Sudo::Defaults $defaults = $sudo::params::defaults,
Sudo::Defaults $defaults = $sudo::params::defaults,
) inherits sudo::params {
case $enable {
true: {
Expand Down
2 changes: 1 addition & 1 deletion templates/sudoers.rhel9.erb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ Defaults match_group_by_gid
# Disable this option for new behavior.
Defaults always_query_group_plugin

Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS"
Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
Expand Down Expand Up @@ -135,3 +134,4 @@ root ALL=(ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
1 change: 1 addition & 0 deletions types/defaults_operator.pp
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# @summary custom datatype that validates sudo defaults operators
type Sudo::Defaults_operator = Enum['=','+=','-=','!']

0 comments on commit 632ba9b

Please sign in to comment.