diff options
Diffstat (limited to 'manifests/init.pp')
-rw-r--r-- | manifests/init.pp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 973049c..4fe22be 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -29,7 +29,7 @@ class tftp ( $address = $tftp::params::address, $port = $tftp::params::port, $options = $tftp::params::options, - $inetd = false, + $inetd = $tftp::params::inetd, $package = $tftp::params::package, $binary = $tftp::params::binary, $defaults = $tftp::params::defaults @@ -39,20 +39,20 @@ class tftp ( ensure => present, name => $package, } + if $defaults { - file { '/etc/default/tftpd-hpa': - ensure => file, - owner => 'root', - group => 'root', - mode => '0644', - content => template('tftp/tftpd-hpa.erb'), - require => Package['tftpd-hpa'], + file { '/etc/default/tftpd-hpa': + ensure => file, + owner => 'root', + group => 'root', + mode => '0644', + content => template('tftp/tftpd-hpa.erb'), + require => Package['tftpd-hpa'], notify => Service['tftpd-hpa'], - } + } } if $inetd { - include 'xinetd' xinetd::service { 'tftp': @@ -67,7 +67,8 @@ class tftp ( flags => 'IPv4', per_source => '11', wait => 'yes', - } + } + $svc_ensure = stopped $svc_enable = false } else { |