Skip to content
Snippets Groups Projects
Commit 20831814 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

puppet_exclude.txt now always created.

parent 10a91da4
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
class lysbackup (
String $backup_user,
String $user = 'root',
Optional[Array[String]] $exclude = undef,
Optional[Array[String]] $exclude = [],
) {
package { 'borgbackup':
......@@ -14,15 +14,10 @@ class lysbackup (
recurse => true,
mode => '0744',
source => 'puppet:///modules/lysbackup/opt/lysbackup/',
}
if $exclude != undef {
file { '/opt/lysbackup/puppet_exclude.txt':
} -> file { '/opt/lysbackup/puppet_exclude.txt':
ensure => file,
# << '' for trailing newline
content => join($exclude << '', "\n"),
after => File['/opt/lysbackup'],
}
}
cron { 'borgbackup':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment