diff --git a/manifests/server.pp b/manifests/server.pp index 2a3d00e..5c3e018 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -8,8 +8,8 @@ # class rsync::server( $use_xinetd = true, - $address = '0.0.0.0', - $motd_file = 'UNSET', + $address = undef, + $motd_file = undef, $use_chroot = 'yes', $uid = 'nobody', $gid = 'nobody', diff --git a/spec/classes/server_spec.rb b/spec/classes/server_spec.rb index 5280702..d673fc8 100644 --- a/spec/classes/server_spec.rb +++ b/spec/classes/server_spec.rb @@ -17,7 +17,7 @@ :order => '00_header', }) is_expected.to contain_concat__fragment('rsyncd_conf_header').with_content(/^use chroot\s*=\s*yes$/) - is_expected.to contain_concat__fragment('rsyncd_conf_header').with_content(/^address\s*=\s*0.0.0.0$/) + is_expected.not_to contain_concat__fragment('rsyncd_conf_header').with_content(/^address\s*=.*$/) } end diff --git a/templates/header.erb b/templates/header.erb index 9068847..11d344b 100644 --- a/templates/header.erb +++ b/templates/header.erb @@ -8,7 +8,9 @@ use chroot = <%= @use_chroot %> log format = %t %a %m %f %b syslog facility = local3 timeout = 300 +<% if @address -%> address = <%= @address %> -<% if @motd_file != 'UNSET' -%> +<% end -%> +<% if @motd_file -%> motd file = <%= @motd_file %> <% end -%>