Skip to content

Commit b018a50

Browse files
author
Clayton O'Neill
committed
Puppet 4 fixes
This fixes two issues: * In puppet 4, undef isn't a string, but is actually a nil value. * In puppet 4, exported resources must still have all required specified, even if they're not used on the host they're being exported from.
1 parent bf21b6f commit b018a50

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

manifests/backup.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
host => $host,
1010
server => $::rsnapshot::client::server,
1111
client_user => $::rsnapshot::client::client_user,
12-
options => $options
12+
options => $options,
13+
config_file => undef,
1314
}
1415

1516
}

templates/config.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ snapshot_root <%= @snapshot_root %>/
3333
#################################
3434

3535
<% @programs.each do |program,directory| -%>
36-
<%- if directory.to_s != 'undef' -%>
36+
<%- if directory and directory.to_s != 'undef' -%>
3737
<%= program %> <%= directory %>
3838
<%- end -%>
3939
<% end -%>
@@ -43,7 +43,7 @@ snapshot_root <%= @snapshot_root %>/
4343
###########
4444

4545
<% @options.each do |option,value| -%>
46-
<%- if value.to_s != 'undef' -%>
46+
<%- if value and value.to_s != 'undef' -%>
4747
<%= option %> <%= value %>
4848
<%- end -%>
4949
<% end -%>

0 commit comments

Comments
 (0)