All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 Optional[String[1]] $sudogroup = undef,
4 $include_directory = '/etc/sudoers.d'
9 validate_cmd => "sh -c 'if ! visudo --check --file=%; then cat %; exit 1; fi'",
11 $default_target = '00-defaults'
15 include sudo::defaults
18 Optional[String[1]] $parameter = undef,
19 Variant[String[1],Array[String[1]],Integer,Boolean] $value = true,
20 Enum['generic','host','user','cmnd','runas'] $context = 'generic',
21 Optional[Variant[Array[String[1]],String[1]]] $list = undef,
22 String[1] $target = $sudo::default_target,
24 Optional[String[1]] $comment = undef,
25 Boolean $newline_before = true,
27 $param = $parameter ? { undef => $name, default => $parameter }
28 $_list = type($list) ? { list => $list, default => [$list] }
29 sudo::internals::add_sudoers_fragment { "${name}":
31 content => template("sudo/option_line.erb"),
38 Enum['host','user','cmnd','runas'] $type,
39 Optional[Variant[Array[String[1]],String[1]]] $list = undef,
40 String[1] $target = $sudo::default_target,
42 Optional[String[1]] $comment = undef,
43 Boolean $newline_before = true,
45 if $name !~ /^[[:upper:]][[:upper:]_[:digit:]]*$/ {
46 fail("sudoers alias definition '$name' can only contain uppercase letter, numbers, and the underscore")
48 $_list = type($list) ? { list => $list, default => [$list] }
49 sudo::internals::add_sudoers_fragment { "${name}":
51 content => template("sudo/alias_line.erb"),
58 Variant[Array[String[1]],String[1]] $who,
59 Variant[Array[String[1]],String[1]] $where = 'ALL',
60 Optional[Variant[Array[String[1]],String[1]]] $as_whom = 'ALL',
61 Optional[Variant[Array[String[1]],String[1]]] $as_group = 'ALL',
62 Variant[Array[String[1]],String[1]] $what,
63 String[1] $target = $sudo::default_target,
65 Optional[String[1]] $comment = undef,
66 Boolean $newline_before = true,
69 $_comment = $comment ? { undef => $name, default => $comment }
70 sudo::internals::add_sudoers_fragment { "${name}":
72 content => template("sudo/rule_line.erb"),