From: Stephen Gran Date: Wed, 25 Apr 2012 07:04:45 +0000 (+0100) Subject: This can default to bind to any X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=e73206cd1c3007453ccc3df0bd0a8605081fd0f0;p=mirror%2Fdsa-puppet.git This can default to bind to any Signed-off-by: Stephen Gran --- diff --git a/modules/xinetd/manifests/service.pp b/modules/xinetd/manifests/service.pp index 3dbc8cb07..389c0ca96 100644 --- a/modules/xinetd/manifests/service.pp +++ b/modules/xinetd/manifests/service.pp @@ -1,8 +1,8 @@ define xinetd::service ( - $bind, $id, $server, $port, + $bind='', $socket_type=stream, $protocol=tcp, $flags=IPv6, @@ -30,7 +30,7 @@ define xinetd::service ( } } - file { "/etc/xinetd.d/${name}.conf": + file { "/etc/xinetd.d/${name}": ensure => $ensure, noop => true, content => template('xinetd/service.erb'), diff --git a/modules/xinetd/templates/service.erb b/modules/xinetd/templates/service.erb index bb71850ee..8219f3933 100644 --- a/modules/xinetd/templates/service.erb +++ b/modules/xinetd/templates/service.erb @@ -1,6 +1,8 @@ service <%= scope.lookupvar('port') %> { +<%- if scope.lookupvar('bind') != '' -%> bind = <%= scope.lookupvar('bind') %> +<%- end -%> id = <%= scope.lookupvar('id') %> socket_type = <%= scope.lookupvar('stream') %>