diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-02-20 22:08:53 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-02-20 23:05:11 -0500 |
commit | f06adb8f69268a6e5f23b11e37adc6662a711288 (patch) | |
tree | 608fc720fb0be8407d12ac9e2e41dd5902999016 /modules | |
parent | 45a094e7f6240c5f71fcdeaa13668bc03b74fc9e (diff) | |
download | puppet-tozt-f06adb8f69268a6e5f23b11e37adc6662a711288.tar.gz puppet-tozt-f06adb8f69268a6e5f23b11e37adc6662a711288.zip |
parameterize tarsnap backups
Diffstat (limited to 'modules')
-rw-r--r-- | modules/tarsnap/manifests/init.pp | 5 | ||||
-rw-r--r-- | modules/tozt/files/acts.conf (renamed from modules/tarsnap/files/acts.conf) | 0 | ||||
-rw-r--r-- | modules/tozt/manifests/backups.pp | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/modules/tarsnap/manifests/init.pp b/modules/tarsnap/manifests/init.pp index c397164..a364dce 100644 --- a/modules/tarsnap/manifests/init.pp +++ b/modules/tarsnap/manifests/init.pp @@ -1,4 +1,4 @@ -class tarsnap { +class tarsnap($source=undef, $content=undef) { include cron package { 'tarsnap': @@ -14,7 +14,8 @@ class tarsnap { '/etc/tarsnap/tarsnap.conf': source => 'puppet:///modules/tarsnap/tarsnap.conf'; '/etc/acts.conf': - source => 'puppet:///modules/tarsnap/acts.conf'; + source => $source, + content => $content; '/etc/cron.daily/acts': source => 'puppet:///modules/tarsnap/acts', mode => '0755', diff --git a/modules/tarsnap/files/acts.conf b/modules/tozt/files/acts.conf index fd274db..fd274db 100644 --- a/modules/tarsnap/files/acts.conf +++ b/modules/tozt/files/acts.conf diff --git a/modules/tozt/manifests/backups.pp b/modules/tozt/manifests/backups.pp index 054ef02..a62f3f1 100644 --- a/modules/tozt/manifests/backups.pp +++ b/modules/tozt/manifests/backups.pp @@ -1,5 +1,7 @@ class tozt::backups { - include tarsnap + class { "tarsnap": + source => "puppet:///modules/tozt/acts.conf"; + } $encrypt_passphrase = secret::value('duplicati-encrypt') $url = secret::value('duplicati-url') |