File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,6 +188,30 @@ Host or array of hosts in this group
188188
189189Description of this host group
190190
191+ sudo::line { "Icinga-no-tty":
192+ ensure => present, # whether the rule should exist or not (present is the default)
193+ line => 'Defaults:icinga !requiretty', # can also be an array of hosts
194+ comment => "enable access for icinga without requiring tty",
195+ }
196+
197+ ### sudo::line
198+
199+ This type manages pre-formatted lines to be inserted to sudoers
200+
201+ ** Parameters within sudo::line**
202+
203+ #### ` ensure `
204+
205+ Whether the specific line should exist or not (present is the default)
206+
207+ #### ` line `
208+
209+ Optional content of the line to be managed
210+
211+ #### ` comment `
212+
213+ Optional description which is inserted befor the line
214+
191215 sudo::runas { "whoever":
192216 ensure => present, # whether the rule should exist or not (present is the default)
193217 who => 'bob', # can also be an array of users
Original file line number Diff line number Diff line change 1+ define sudo::line (
2+ $line ,
3+ $ensure = present ,
4+ $comment = undef ,
5+ ) {
6+
7+ sudo::register {"line_${name}" :
8+ ensure => $ensure ,
9+ content => template (' sudo/line.erb' ),
10+ }
11+ }
Original file line number Diff line number Diff line change 1+ <% if @comment -%>
2+ #
3+ # <%= @comment %>
4+ <% end -%>
5+ <% if @line -%>
6+ <%= @line %>
7+ <% end -%>
You can’t perform that action at this time.
0 commit comments