From 5ef8ed93154c69c4eef81a0ec523eeaf762a41fd Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Thu, 26 Apr 2012 20:31:55 -0700 Subject: [PATCH 1/9] Add xinetd::params class The params class uses facts to set tailored filenames and paths for the node. This is desireable in order to support multiple operating systems. --- manifests/init.pp | 11 ++++++----- manifests/params.pp | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 manifests/params.pp diff --git a/manifests/init.pp b/manifests/init.pp index 16589eb..b027bd1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -10,18 +10,19 @@ # } # class xinetd { + include xinetd::params - package { 'xinetd': } + package { $xinetd::params::xinetd_package: } - file { '/etc/xinetd.conf': + file { $xinetd::params::xinetd_conffile: source => 'puppet:///modules/xinetd/xinetd.conf', } - service { 'xinetd': + service { $xinetd::params::xinetd_service: ensure => running, enable => true, restart => '/etc/init.d/xinetd reload', - require => [ Package['xinetd'], - File['/etc/xinetd.conf'] ], + require => [ Package[$xinetd::params::xinetd_package], + File[$xinetd::params::xinetd_conffile] ], } } diff --git a/manifests/params.pp b/manifests/params.pp new file mode 100644 index 0000000..3d8d3b3 --- /dev/null +++ b/manifests/params.pp @@ -0,0 +1,34 @@ +class xinetd::params { + + case $osfamily { + 'Debian': { + $xinetd_confdir = '/etc/xinetd.d' + $xinetd_conffile = '/etc/xinetd.conf' + $xinetd_package = 'xinetd' + $xinetd_service = 'xinetd' + } + 'FreeBSD': { + $xinetd_confdir = '/usr/local/etc/xinetd.d' + $xinetd_conffile = '/usr/local/etc/xinetd.conf' + $xinetd_package = 'security/xinetd' + $xinetd_service = 'xinetd' + } + 'Suse': { + $xinetd_confdir = '/etc/xinetd.d' + $xinetd_conffile = '/etc/xinetd.conf' + $xinetd_package = 'xinetd' + $xinetd_service = 'xinetd' + } + 'Solaris': { + fail('xinetd: module does not support Solaris') + } + default: { + $xinetd_confdir = '/etc/xinetd.d' + $xinetd_conffile = '/etc/xinetd.conf' + $xinetd_package = 'xinetd' + $xinetd_service = 'xinetd' + } + } + +} + From ae681b3768819520a103b09c6bf43ac20c2a9aea Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Thu, 26 Apr 2012 20:32:45 -0700 Subject: [PATCH 2/9] Convert files/xinetd.conf to a template Not all operating systems store their default xinetd configuration file in /etc/xinetd.conf. Converting from a flat file to a template in order to support those operating systems. --- manifests/init.pp | 2 +- files/xinetd.conf => templates/xinetd.conf.erb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) rename files/xinetd.conf => templates/xinetd.conf.erb (94%) diff --git a/manifests/init.pp b/manifests/init.pp index b027bd1..95684a7 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -15,7 +15,7 @@ package { $xinetd::params::xinetd_package: } file { $xinetd::params::xinetd_conffile: - source => 'puppet:///modules/xinetd/xinetd.conf', + content => template('xinetd/xinetd.conf.erb'), } service { $xinetd::params::xinetd_service: diff --git a/files/xinetd.conf b/templates/xinetd.conf.erb similarity index 94% rename from files/xinetd.conf rename to templates/xinetd.conf.erb index 3dfd4c9..ca38188 100644 --- a/files/xinetd.conf +++ b/templates/xinetd.conf.erb @@ -48,5 +48,4 @@ defaults # banner_success = } -includedir /etc/xinetd.d - +includedir <%= scope.lookupvar('xinetd::params::xinetd_confdir') %> From d6aa4d4bc843b22239e8e3cbbdc43fe4d37d3bd6 Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Thu, 26 Apr 2012 20:52:56 -0700 Subject: [PATCH 3/9] Manage xinetd.d, rework init.pp Make sure xinetd.d exists (not all OS packages automatically create such a file). Also rework init.pp order. --- manifests/init.pp | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 95684a7..a031f30 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -12,17 +12,35 @@ class xinetd { include xinetd::params - package { $xinetd::params::xinetd_package: } + File { + owner => 'root', + group => '0', + notify => Service[$xinetd::params::xinetd_service], + require => Package[$xinetd::params::xinetd_service], + } + + file { $xinetd::params::xinetd_confdir: + ensure => directory, + mode => '0755', + } file { $xinetd::params::xinetd_conffile: + ensure => file, + mode => '0644', content => template('xinetd/xinetd.conf.erb'), } + package { $xinetd::params::xinetd_package: + ensure => installed, + before => Service[$xinetd::params::xinetd_service], + } + service { $xinetd::params::xinetd_service: - ensure => running, - enable => true, - restart => '/etc/init.d/xinetd reload', - require => [ Package[$xinetd::params::xinetd_package], - File[$xinetd::params::xinetd_conffile] ], + ensure => running, + enable => true, + hasrestart => true, + hasstatus => true, + require => File[$xinetd::params::xinetd_conffile], } + } From e59819293e5410a2205b453bb5c64049fe09eb04 Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Thu, 26 Apr 2012 21:19:18 -0700 Subject: [PATCH 4/9] Expand xinetd::service options Add a bunch of extra xinetd::service parameters. Refactor a bit. Options that default to undef are not given a corresponding line in the xinetd service file, leaving their value to the xinetd default. Modified options: - bind = '0.0.0.0' + bind = undef New options: + access_times = undef + ensure = present + groups = 'yes' + log_on_failure = undef + log_type = undef + no_access = undef + only_from = undef + service_name = $title + xtype = undef --- manifests/service.pp | 93 ++++++++++++++++++++++++++----------------- templates/service.erb | 47 ++++++++++++++++++---- 2 files changed, 95 insertions(+), 45 deletions(-) diff --git a/manifests/service.pp b/manifests/service.pp index c499cda..950c37c 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -4,27 +4,32 @@ # all parameters match up with xinetd.conf(5) man page # # Parameters: -# $port - required - determines the service port -# $server - required - determines the executable for this service # $ensure - optional - defaults to 'present' -# $cps - optional -# $flags - optional -# $per_source - optional -# $server_args - optional # $log_on_failure - optional - may contain any combination of # 'HOST', 'USERID', 'ATTEMPT' -# $disable - optional - defaults to 'no' -# $socket_type - optional - defaults to 'stream' -# $protocol - optional - defaults to 'tcp' -# $user - optional - defaults to 'root' -# $group - optional - defaults to 'root' -# $instances - optional - defaults to 'UNLIMITED' -# $wait - optional - based on $protocol -# will default to 'yes' for udp and 'no' for tcp -# $bind - optional - defaults to '0.0.0.0' # $service_type - optional - type setting in xinetd # may contain any combinarion of 'RPC', 'INTERNAL', # 'TCPMUX/TCPMUXPLUS', 'UNLISTED' +# $cps - optional +# $flags - optional +# $per_source - optional +# $port - required - determines the service port +# $server - required - determines the program to execute for this service +# $server_args - optional +# $disable - optional - defaults to "no" +# $socket_type - optional - defaults to "stream" +# $protocol - optional - defaults to "tcp" +# $user - optional - defaults to "root" +# $group - optional - defaults to "root" +# $groups - optional - defaults to "yes" +# $instances - optional - defaults to "UNLIMITED" +# $only_from - optional +# $wait - optional - based on $protocol will default to "yes" for udp and "no" for tcp +# $xtype - optional - determines the "type" of service, see xinetd.conf(5) +# $no_access - optional +# $access_times - optional +# $log_type - optional +# $bind - optional # # Actions: # setups up a xinetd service by creating a file in /etc/xinetd.d/ @@ -35,52 +40,66 @@ # # Sample Usage: # # setup tftp service -# xinetd::service { 'tftp': -# port => '69', -# server => '/usr/sbin/in.tftpd', -# server_args => '-s $base', -# socket_type => 'dgram', -# protocol => 'udp', -# cps => '100 2', -# flags => 'IPv4', -# per_source => '11', +# xinetd::service {"tftp": +# port => "69", +# server => "/usr/sbin/in.tftpd", +# server_args => "-s $base", +# socket_type => "dgram", +# protocol => "udp", +# cps => "100 2", +# flags => "IPv4", +# per_source => "11", # } # xinetd::service # define xinetd::service ( $port, $server, $ensure = present, + $log_on_failure = undef, + $service_type = undef + $service_name = $title, $cps = undef, + $disable = 'no', $flags = undef, + $group = 'root', + $groups = 'yes', + $instances = 'UNLIMITED', $log_on_failure = undef, $per_source = undef, + $protocol = 'tcp', $server_args = undef, - $disable = 'no', $socket_type = 'stream', - $protocol = 'tcp', $user = 'root', - $group = 'root', - $instances = 'UNLIMITED', + $only_from = undef, $wait = undef, - $bind = '0.0.0.0', - $service_type = undef + $xtype = undef, + $no_access = undef, + $access_times = undef, + $log_type = undef, + $bind = undef ) { + include xinetd + include xinetd::params include xinetd if $wait { - $mywait = $wait + $wait_real = $wait } else { - $mywait = $protocol ? { - tcp => 'no', - udp => 'yes' + case $protocol { + 'tcp': { $wait_real = 'no' } + 'udp': { $wait_real = 'yes' } + default: { fail('wait not set, unable to determine sane default') } } } - file { "/etc/xinetd.d/${name}": + file { "${xinetd::params::xinetd_confdir}/${title}": ensure => $ensure, + owner => 'root', + mode => '0644', content => template('xinetd/service.erb'), - notify => Service['xinetd'], - require => Package['xinetd'], + notify => Service[$xinetd::params::xinetd_service], + require => File[$xinetd::params::xinetd_confdir], } + } diff --git a/templates/service.erb b/templates/service.erb index 79802f3..557c366 100644 --- a/templates/service.erb +++ b/templates/service.erb @@ -1,21 +1,52 @@ # This file is being maintained by Puppet. # DO NOT EDIT -service <%= @name %> +service <%= @service_name %> { port = <%= @port %> disable = <%= @disable %> socket_type = <%= @socket_type %> protocol = <%= @protocol %> - wait = <%= @mywait %> + wait = <%= @wait_real %> user = <%= @user %> group = <%= @group %> + groups = <%= @groups %> server = <%= @server %> bind = <%= @bind %> -<% if @server_args %> server_args = <%= @server_args %><% end %> -<% if @per_source %> per_source = <%= @per_source %><% end %> -<% if @log_on_failure %> log_on_failure += <%= @log_on_failure %><% end %> -<% if @cps %> cps = <%= @cps %><% end %> -<% if @flags %> flags = <%= @flags %><% end %> -<% if @service_type %> type = <%= @service_type %><% end %> +<% if @service_type %> + type = <%= @service_type %> +<% end %> +<% if @server_args -%> + server_args = <%= @server_args %> +<% end -%> +<% if @only_from -%> + only_from = <%= @only_from %> +<% end -%> +<% if @per_source -%> + per_source = <%= @per_source %> +<% end -%> +<% if @log_on_failure -%> + log_on_failure += <%= @log_on_failure %> +<% end -%> +<% if @cps -%> + cps = <%= @cps %> +<% end -%> +<% if @flags -%> + flags = <%= @flags %> +<% end -%> +<% if @xtype -%> + type = <%= @xtype %> +<% end -%> +<% if @no_access -%> + no_access = <%= @no_access %> +<% end -%> +<% if @access_times -%> + access_times = <%= @access_times %> +<% end -%> +<% if @log_type -%> + log_type = <%= @log_type %> +<% end -%> +<% if @bind -%> + bind = <%= @bind %> +<% end -%> } From 6402e3d5cd5b7308e0cd151fa0df4c7a8bdae1ba Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Tue, 8 May 2012 11:23:33 -0700 Subject: [PATCH 5/9] Fix file 'require' bug Previously, the file resource defaults in init.pp specified Package[$xinetd_service] as a dependency. This has some not-so-subtle problems. It has been fixed to use Package[$xinetd_package] as originally intended. --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index a031f30..9ddc98d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -16,7 +16,7 @@ owner => 'root', group => '0', notify => Service[$xinetd::params::xinetd_service], - require => Package[$xinetd::params::xinetd_service], + require => Package[$xinetd::params::xinetd_package], } file { $xinetd::params::xinetd_confdir: From 8831278c6daea2e371b3a5f1a705ef084fe3d237 Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Mon, 14 May 2012 14:37:41 -0700 Subject: [PATCH 6/9] Change hasrestart parameter to false Whatever puppet is doing to restart the xinetd service, it's not working. Possibly puppet is issuing a "reload" command. Setting hasrestart to false will cause puppet to issue a stop command followed by a start command, which *does* do the right thing. --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 9ddc98d..4eccf56 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -38,7 +38,7 @@ service { $xinetd::params::xinetd_service: ensure => running, enable => true, - hasrestart => true, + hasrestart => false, hasstatus => true, require => File[$xinetd::params::xinetd_conffile], } From 85782962f9e903ab28dab5a24466e2a5540dc2bf Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Fri, 26 Jul 2013 11:16:08 -0700 Subject: [PATCH 7/9] Puppet lint fixes --- manifests/params.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index 3d8d3b3..01f3133 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,6 +1,6 @@ class xinetd::params { - case $osfamily { + case $::osfamily { 'Debian': { $xinetd_confdir = '/etc/xinetd.d' $xinetd_conffile = '/etc/xinetd.conf' From 74d681ae580ad76a90d4001235612222254ae8db Mon Sep 17 00:00:00 2001 From: William Van Hevelingen Date: Fri, 26 Jul 2013 11:21:42 -0700 Subject: [PATCH 8/9] Merge pdxcat/xinetd with upstream - Fix rebase errors --- manifests/service.pp | 2 +- templates/service.erb | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/manifests/service.pp b/manifests/service.pp index 950c37c..aa454f9 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -56,7 +56,7 @@ $server, $ensure = present, $log_on_failure = undef, - $service_type = undef + $service_type = undef, $service_name = $title, $cps = undef, $disable = 'no', diff --git a/templates/service.erb b/templates/service.erb index 557c366..9c87bc3 100644 --- a/templates/service.erb +++ b/templates/service.erb @@ -12,10 +12,12 @@ service <%= @service_name %> group = <%= @group %> groups = <%= @groups %> server = <%= @server %> +<% if @bind -%> bind = <%= @bind %> -<% if @service_type %> +<% end -%> +<% if @service_type -%> type = <%= @service_type %> -<% end %> +<% end -%> <% if @server_args -%> server_args = <%= @server_args %> <% end -%> @@ -46,7 +48,4 @@ service <%= @service_name %> <% if @log_type -%> log_type = <%= @log_type %> <% end -%> -<% if @bind -%> - bind = <%= @bind %> -<% end -%> } From 5c9dd81c7c6b2084280b6555cb1dd775407eac29 Mon Sep 17 00:00:00 2001 From: William Van Hevelingen Date: Mon, 29 Jul 2013 17:15:32 -0700 Subject: [PATCH 9/9] Refactor xinetd and xinetd::service - refactor xinetd class to be parameterized - rename $real_wait to $_wait to indicate it was munged - use validate_re function to verify tcp|udp - rename $xinetd_* to * - remove duplicate include xinetd - refactor template not to use scope.lookupvar - fix failing spec tests - add dependency on stdlib - add failure on unsupported osfamiles --- .fixtures.yml | 2 + Modulefile | 1 + manifests/init.pp | 26 ++++++++----- manifests/params.pp | 36 ++++++++--------- manifests/service.pp | 60 +++++++++++++++++++---------- spec/classes/xinetd_init_spec.rb | 7 +++- spec/defines/xinetd_service_spec.rb | 5 +++ templates/service.erb | 2 +- templates/xinetd.conf.erb | 2 +- 9 files changed, 90 insertions(+), 51 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index 3affff3..269630c 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,3 +1,5 @@ fixtures: + repositories: + "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib" symlinks: "xinetd": "#{source_dir}" diff --git a/Modulefile b/Modulefile index f9ad266..c0d52d3 100644 --- a/Modulefile +++ b/Modulefile @@ -6,3 +6,4 @@ license 'Apache License 2.0' summary 'Puppet Labs Xinetd Module' description 'Puppet module to configure xinetd services' project_page 'https://github.com/puppetlabs/puppetlabs-xinetd' +dependency 'puppetlabs/stdlib', '>= 2.2.1' diff --git a/manifests/init.pp b/manifests/init.pp index 4eccf56..5ea9f30 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -9,38 +9,44 @@ # server_args => '--daemon --config /etc/rsync.conf', # } # -class xinetd { - include xinetd::params +class xinetd ( + $confdir = $xinetd::params::confdir, + $conffile = $xinetd::params::conffile, + $package_name = $xinetd::params::package_name, + $service_name = $xinetd::params::service_name +) inherits xinetd::params { File { owner => 'root', group => '0', - notify => Service[$xinetd::params::xinetd_service], - require => Package[$xinetd::params::xinetd_package], + notify => Service[$service_name], + require => Package[$package_name], } - file { $xinetd::params::xinetd_confdir: + file { $confdir: ensure => directory, mode => '0755', } - file { $xinetd::params::xinetd_conffile: + # Template uses: + # $confdir + file { $conffile: ensure => file, mode => '0644', content => template('xinetd/xinetd.conf.erb'), } - package { $xinetd::params::xinetd_package: + package { $package_name: ensure => installed, - before => Service[$xinetd::params::xinetd_service], + before => Service[$service_name], } - service { $xinetd::params::xinetd_service: + service { $service_name: ensure => running, enable => true, hasrestart => false, hasstatus => true, - require => File[$xinetd::params::xinetd_conffile], + require => File[$conffile], } } diff --git a/manifests/params.pp b/manifests/params.pp index 01f3133..2a440a5 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -2,31 +2,31 @@ case $::osfamily { 'Debian': { - $xinetd_confdir = '/etc/xinetd.d' - $xinetd_conffile = '/etc/xinetd.conf' - $xinetd_package = 'xinetd' - $xinetd_service = 'xinetd' + $confdir = '/etc/xinetd.d' + $conffile = '/etc/xinetd.conf' + $package_name = 'xinetd' + $service_name = 'xinetd' } 'FreeBSD': { - $xinetd_confdir = '/usr/local/etc/xinetd.d' - $xinetd_conffile = '/usr/local/etc/xinetd.conf' - $xinetd_package = 'security/xinetd' - $xinetd_service = 'xinetd' + $confdir = '/usr/local/etc/xinetd.d' + $conffile = '/usr/local/etc/xinetd.conf' + $package_name = 'security/xinetd' + $service_name = 'xinetd' } 'Suse': { - $xinetd_confdir = '/etc/xinetd.d' - $xinetd_conffile = '/etc/xinetd.conf' - $xinetd_package = 'xinetd' - $xinetd_service = 'xinetd' + $confdir = '/etc/xinetd.d' + $conffile = '/etc/xinetd.conf' + $package_name = 'xinetd' + $service_name = 'xinetd' } - 'Solaris': { - fail('xinetd: module does not support Solaris') + 'RedHat': { + $confdir = '/etc/xinetd.d' + $conffile = '/etc/xinetd.conf' + $package_name = 'xinetd' + $service_name = 'xinetd' } default: { - $xinetd_confdir = '/etc/xinetd.d' - $xinetd_conffile = '/etc/xinetd.conf' - $xinetd_package = 'xinetd' - $xinetd_service = 'xinetd' + fail("xinetd: module does not support osfamily ${::osfamily}") } } diff --git a/manifests/service.pp b/manifests/service.pp index aa454f9..d544402 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -40,15 +40,15 @@ # # Sample Usage: # # setup tftp service -# xinetd::service {"tftp": -# port => "69", -# server => "/usr/sbin/in.tftpd", -# server_args => "-s $base", -# socket_type => "dgram", -# protocol => "udp", -# cps => "100 2", -# flags => "IPv4", -# per_source => "11", +# xinetd::service { 'tftp': +# port => '69', +# server => '/usr/sbin/in.tftpd', +# server_args => '-s $base', +# socket_type => 'dgram', +# protocol => 'udp', +# cps => '100 2', +# flags => 'IPv4', +# per_source => '11', # } # xinetd::service # define xinetd::service ( @@ -76,30 +76,50 @@ $no_access = undef, $access_times = undef, $log_type = undef, - $bind = undef + $bind = undef, ) { - include xinetd - include xinetd::params include xinetd if $wait { - $wait_real = $wait + $_wait = $wait } else { - case $protocol { - 'tcp': { $wait_real = 'no' } - 'udp': { $wait_real = 'yes' } - default: { fail('wait not set, unable to determine sane default') } + validate_re($protocol, '(tcp|udp)') + $_wait = $protocol ? { + tcp => 'no', + udp => 'yes' } } - file { "${xinetd::params::xinetd_confdir}/${title}": + # Template uses: + # - $port + # - $disable + # - $socket_type + # - $protocol + # - $_wait + # - $user + # - $group + # - $groups + # - $server + # - $bind + # - $service_type + # - $server_args + # - $only_from + # - $per_source + # - $log_on_failure + # - $cps + # - $flags + # - $xtype + # - $no_access + # - $access_types + # - $log_type + file { "${xinetd::confdir}/${title}": ensure => $ensure, owner => 'root', mode => '0644', content => template('xinetd/service.erb'), - notify => Service[$xinetd::params::xinetd_service], - require => File[$xinetd::params::xinetd_confdir], + notify => Service[$xinetd::service_name], + require => File[$xinetd::confdir], } } diff --git a/spec/classes/xinetd_init_spec.rb b/spec/classes/xinetd_init_spec.rb index 167e753..b01cfad 100644 --- a/spec/classes/xinetd_init_spec.rb +++ b/spec/classes/xinetd_init_spec.rb @@ -1,9 +1,14 @@ require 'spec_helper' describe 'xinetd' do + + let :facts do + { :osfamily => 'Debian' } + end + it { should contain_package('xinetd') should contain_file('/etc/xinetd.conf') - should contain_service('xinetd').with_restart('/etc/init.d/xinetd reload') + should contain_service('xinetd') } end diff --git a/spec/defines/xinetd_service_spec.rb b/spec/defines/xinetd_service_spec.rb index 01901fb..b987cc1 100644 --- a/spec/defines/xinetd_service_spec.rb +++ b/spec/defines/xinetd_service_spec.rb @@ -1,6 +1,11 @@ require 'spec_helper' describe 'xinetd::service' do + + let :facts do + { :osfamily => 'Debian' } + end + let :default_params do { 'port' => '80', diff --git a/templates/service.erb b/templates/service.erb index 9c87bc3..bf2f740 100644 --- a/templates/service.erb +++ b/templates/service.erb @@ -7,7 +7,7 @@ service <%= @service_name %> disable = <%= @disable %> socket_type = <%= @socket_type %> protocol = <%= @protocol %> - wait = <%= @wait_real %> + wait = <%= @_wait %> user = <%= @user %> group = <%= @group %> groups = <%= @groups %> diff --git a/templates/xinetd.conf.erb b/templates/xinetd.conf.erb index ca38188..3a08429 100644 --- a/templates/xinetd.conf.erb +++ b/templates/xinetd.conf.erb @@ -48,4 +48,4 @@ defaults # banner_success = } -includedir <%= scope.lookupvar('xinetd::params::xinetd_confdir') %> +includedir <%= @confdir %>