Skip to content

Commit 7122983

Browse files
committed
Merge pull request #25 from blkperl/fix_puppet32x_dep
Fix puppet 3.2.x deprecation warnings
2 parents b67b4dd + 45e5d75 commit 7122983

File tree

3 files changed

+37
-19
lines changed

3 files changed

+37
-19
lines changed

manifests/server.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
ensure => directory,
4343
}
4444

45+
# Template uses:
46+
# - $use_chroot
47+
# - $address
48+
# - $motd_file
4549
file { "${rsync_fragments}/header":
4650
content => template('rsync/header.erb'),
4751
}

templates/header.erb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
pid file = /var/run/rsyncd.pid
55
uid = nobody
66
gid = nobody
7-
use chroot = <%= use_chroot %>
7+
use chroot = <%= @use_chroot %>
88
log format = %t %a %m %f %b
99
syslog facility = local3
1010
timeout = 300
11-
address = <%= address %>
12-
<% if motd_file != 'UNSET' %>motd file = <%= motd_file %><% end %>
11+
address = <%= @address %>
12+
<% if @motd_file != 'UNSET' -%>
13+
motd file = <%= @motd_file %>
14+
<% end -%>

templates/module.erb

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
# This file is being maintained by Puppet.
22
# DO NOT EDIT
33

4-
[ <%= name %> ]
5-
path = <%= path %>
6-
read only = <%= read_only %>
7-
write only = <%= write_only %>
8-
list = <%= list %>
9-
uid = <%= uid %>
10-
gid = <%= gid %>
11-
incoming chmod = <%= incoming_chmod %>
12-
outgoing chmod = <%= outgoing_chmod %>
13-
max connections = <%= max_connections %>
14-
<% if Integer(max_connections) > 0 %>lock file = <%= lock_file %><% end %>
15-
<% if comment != :undef %>comment = <%= comment %><% end %>
16-
<% if secrets_file != :undef %>secrets file = <%= secrets_file %><% end %>
17-
<% if auth_users != :undef %>auth users = <%= auth_users.to_a.join(', ')%><% end %>
18-
<% if hosts_allow != :undef %>hosts allow = <%= hosts_allow.to_a.join(' ')%><% end %>
19-
<% if hosts_deny != :undef %>hosts deny = <%= hosts_deny.to_a.join(' ')%><% end %>
4+
[ <%= @name %> ]
5+
path = <%= @path %>
6+
read only = <%= @read_only %>
7+
write only = <%= @write_only %>
8+
list = <%= @list %>
9+
uid = <%= @uid %>
10+
gid = <%= @gid %>
11+
incoming chmod = <%= @incoming_chmod %>
12+
outgoing chmod = <%= @outgoing_chmod %>
13+
max connections = <%= @max_connections %>
14+
<% if Integer(@max_connections) > 0 -%>
15+
lock file = <%= @lock_file %>
16+
<% end -%>
17+
<% if @comment -%>
18+
comment = <%= @comment %>
19+
<% end -%>
20+
<% if @secrets_file -%>
21+
secrets file = <%= @secrets_file %>
22+
<% end -%>
23+
<% if @auth_users -%>
24+
auth users = <%= @auth_users.to_a.join(', ')%>
25+
<% end %>
26+
<% if @hosts_allow -%>
27+
hosts allow = <%= @hosts_allow.to_a.join(' ')%>
28+
<% end -%>
29+
<% if @hosts_deny -%>
30+
hosts deny = <%= @hosts_deny.to_a.join(' ')%>
31+
<% end -%>
2032

2133

0 commit comments

Comments
 (0)