diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-11-18 18:16:30 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-11-18 18:16:30 -0500 |
commit | c2b05e0418794f5b9db5e5fdeadf05edd04e8340 (patch) | |
tree | 2b36791bf6a7d74fc1293764291f5757a3477289 /modules/duplicati | |
parent | 67bf95eda5ae1ae63a04dac4f54a84a7500c2063 (diff) | |
download | puppet-tozt-c2b05e0418794f5b9db5e5fdeadf05edd04e8340.tar.gz puppet-tozt-c2b05e0418794f5b9db5e5fdeadf05edd04e8340.zip |
fix some duplicati-client usage
Diffstat (limited to 'modules/duplicati')
-rw-r--r-- | modules/duplicati/manifests/backup.pp | 8 | ||||
-rw-r--r-- | modules/duplicati/manifests/client.pp | 9 |
2 files changed, 11 insertions, 6 deletions
diff --git a/modules/duplicati/manifests/backup.pp b/modules/duplicati/manifests/backup.pp index 5c6dd5d..3c8e19d 100644 --- a/modules/duplicati/manifests/backup.pp +++ b/modules/duplicati/manifests/backup.pp @@ -8,12 +8,8 @@ define duplicati::backup($content) { exec { "load backup for $name": provider => shell, - command => " - duplicati-client login - duplicati-client create backup /etc/duplicati/$name.json - duplicati-client logout - ", - unless => "duplicati-client list backups | grep -qF '- $name:'", + command => "duplicati-client create backup /etc/duplicati/$name.json", + unless => "duplicati-client list backups | grep -qF -- '- $name:'", require => [ Class['duplicati'], File["/etc/duplicati/$name.json"], diff --git a/modules/duplicati/manifests/client.pp b/modules/duplicati/manifests/client.pp index d12e6c4..9904806 100644 --- a/modules/duplicati/manifests/client.pp +++ b/modules/duplicati/manifests/client.pp @@ -26,4 +26,13 @@ class duplicati::client { cwd => '/opt/duplicati-client', require => Exec['clone duplicati-client']; } + + exec { 'duplicati-client login': + command => '/usr/local/bin/duplicati-client login', + creates => '/root/.config/duplicati-client/config.yml', + require => [ + File['/usr/local/bin/duplicati-client'], + Exec['checkout duplicati-client'], + ] + } } |