This can default to bind to any
authorStephen Gran <steve@lobefin.net>
Wed, 25 Apr 2012 07:04:45 +0000 (08:04 +0100)
committerStephen Gran <steve@lobefin.net>
Wed, 25 Apr 2012 07:05:18 +0000 (08:05 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/xinetd/manifests/service.pp
modules/xinetd/templates/service.erb

index 3dbc8cb..389c0ca 100644 (file)
@@ -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'),
index bb71850..8219f39 100644 (file)
@@ -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') %>