Skip to content

Commit e01f611

Browse files
author
Garrett Honeycutt
committed
update template to include log_on_failure
submitted by KrisBuytaert
1 parent d983552 commit e01f611

2 files changed

Lines changed: 29 additions & 26 deletions

File tree

manifests/service.pp

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@
44
# all parameters match up with xinetd.conf(5) man page
55
#
66
# Parameters:
7-
# $port - required - determines the service port
8-
# $server - required - determines the program to execute for this service
9-
# $cps - optional
10-
# $flags - optional
11-
# $per_source - optional
12-
# $server_args - optional
13-
# $disable - optional - defaults to 'no'
14-
# $socket_type - optional - defaults to 'stream'
15-
# $protocol - optional - defaults to 'tcp'
16-
# $user - optional - defaults to 'root'
17-
# $group - optional - defaults to 'root'
18-
# $instances - optional - defaults to 'UNLIMITED'
19-
# $wait - optional - based on $protocol will default to 'yes' for udp and 'no' for tcp
20-
# $bind - optional - defaults to '0.0.0.0'
7+
# $port - required - determines the service port
8+
# $server - required - determines the program to execute for this service
9+
# $cps - optional
10+
# $flags - optional
11+
# $per_source - optional
12+
# $server_args - optional
13+
# $log_on_failure - optional, may contain any combination of 'HOST', 'USERID', 'ATTEMPT'
14+
# $disable - optional - defaults to 'no'
15+
# $socket_type - optional - defaults to 'stream'
16+
# $protocol - optional - defaults to 'tcp'
17+
# $user - optional - defaults to 'root'
18+
# $group - optional - defaults to 'root'
19+
# $instances - optional - defaults to 'UNLIMITED'
20+
# $wait - optional - based on $protocol will default to 'yes' for udp and 'no' for tcp
21+
# $bind - optional - defaults to '0.0.0.0'
2122
#
2223
# Actions:
2324
# setups up a xinetd service by creating a file in /etc/xinetd.d/
@@ -42,18 +43,19 @@
4243
define xinetd::service (
4344
$port,
4445
$server,
45-
$cps = undef,
46-
$flags = undef,
47-
$per_source = undef,
48-
$server_args = undef,
49-
$disable = 'no',
50-
$socket_type = 'stream',
51-
$protocol = 'tcp',
52-
$user = 'root',
53-
$group = 'root',
54-
$instances = 'UNLIMITED',
55-
$wait = undef,
56-
$bind = '0.0.0.0'
46+
$cps = undef,
47+
$flags = undef,
48+
$log_on_failure = undef,
49+
$per_source = undef,
50+
$server_args = undef,
51+
$disable = 'no',
52+
$socket_type = 'stream',
53+
$protocol = 'tcp',
54+
$user = 'root',
55+
$group = 'root',
56+
$instances = 'UNLIMITED',
57+
$wait = undef,
58+
$bind = '0.0.0.0'
5759
) {
5860

5961
if $wait {

templates/service.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ service <%= name %>
1313
bind = <%= bind %>
1414
<% if server_args != :undef %> server_args = <%= server_args %><% end %>
1515
<% if per_source != :undef %> per_source = <%= per_source %><% end %>
16+
<% if log_on_failure != :undef %> log_on_failure += <%= log_on_failure %><% end %>
1617
<% if cps != :undef %> cps = <%= cps %><% end %>
1718
<% if flags != :undef %> flags = <%= flags %><% end %>
1819
}

0 commit comments

Comments
 (0)