File tree Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,10 @@ Rsync comment.
266266
267267File containing motd info.
268268
269+ # #### `pid_file`
270+
271+ PID file. Defaults to /var/run/rsyncd.pid. The pid file parameter won't be applied if set to "UNSET"; rsyncd will not use a PID file in this case.
272+
269273# #### `read_only`
270274
271275yes||no
Original file line number Diff line number Diff line change 1010 $use_xinetd = true ,
1111 $address = ' 0.0.0.0' ,
1212 $motd_file = ' UNSET' ,
13+ Variant[Enum[' UNSET' ], Stdlib::Absolutepath] $pid_file = ' /var/run/rsyncd.pid' ,
1314 $use_chroot = ' yes' ,
1415 $uid = ' nobody' ,
1516 $gid = ' nobody' ,
Original file line number Diff line number Diff line change 1717 } )
1818 is_expected . to contain_concat__fragment ( 'rsyncd_conf_header' ) . with_content ( /^use chroot\s *=\s *yes$/ )
1919 is_expected . to contain_concat__fragment ( 'rsyncd_conf_header' ) . with_content ( /^address\s *=\s *0.0.0.0$/ )
20+ is_expected . to contain_concat__fragment ( 'rsyncd_conf_header' ) . with_content ( /^pid file\s *=\s *\/ var\/ run\/ rsyncd.pid$/ )
2021 }
2122 end
2223
4849 }
4950 end
5051
52+ describe 'when unsetting pid file' do
53+ let :params do
54+ { :pid_file => 'UNSET' }
55+ end
56+
57+ it {
58+ is_expected . not_to contain_concat__fragment ( 'rsyncd_conf_header' ) . with_content ( /^pid file\s *=/ )
59+ }
60+ end
61+
5162 describe 'when overriding use_chroot' do
5263 let :params do
5364 { :use_chroot => 'no' }
Original file line number Diff line number Diff line change 11# This file is being maintained by Puppet.
22# DO NOT EDIT
33
4- pid file = /var/run/rsyncd.pid
4+ <% if @pid_file != 'UNSET' -%>
5+ pid file = <%= @pid_file %>
6+ <% end -%>
57uid = <%= @uid %>
68gid = <%= @gid %>
79use chroot = <%= @use_chroot %>
You can’t perform that action at this time.
0 commit comments