diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-03-27 20:09:57 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-03-27 20:09:57 -0400 |
commit | 4d11155d5e8c1eb65e8db95525d4dbe286228c75 (patch) | |
tree | d4ca6ffbe8ef99a0883c3f61bf3aa2fa3316f84b /modules/tick/files | |
parent | 12d77d5eb1d08b7f8e256cd8ae15b5a0b20a91a5 (diff) | |
download | puppet-tozt-4d11155d5e8c1eb65e8db95525d4dbe286228c75.tar.gz puppet-tozt-4d11155d5e8c1eb65e8db95525d4dbe286228c75.zip |
use sudo for borgmatic
Diffstat (limited to 'modules/tick/files')
-rw-r--r-- | modules/tick/files/plugins/borg | 2 | ||||
-rw-r--r-- | modules/tick/files/plugins/borg.sudoers | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/modules/tick/files/plugins/borg b/modules/tick/files/plugins/borg index 38bbe3c..3e2f1b6 100644 --- a/modules/tick/files/plugins/borg +++ b/modules/tick/files/plugins/borg @@ -5,7 +5,7 @@ require 'json' now = Time.now -data = JSON.load(%x{borgmatic info --archive latest --json}) +data = JSON.load(%x{sudo borgmatic info --archive latest --json}) repository = data[0]["repository"] archive = data[0]["archives"][0] diff --git a/modules/tick/files/plugins/borg.sudoers b/modules/tick/files/plugins/borg.sudoers new file mode 100644 index 0000000..ff5273b --- /dev/null +++ b/modules/tick/files/plugins/borg.sudoers @@ -0,0 +1,3 @@ +Cmnd_Alias BORGMATIC = /usr/bin/borgmatic +telegraf ALL=(ALL) NOPASSWD: BORGMATIC +Defaults!BORGMATIC !logfile, !syslog, !pam_session |