From 36d3361397a83a039bfd2926ab796184e00acdab Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@mail.ru> Date: Wed, 16 Sep 2020 19:47:44 +0200 Subject: [PATCH] Create public .pem key to encrypt backups --- manifests/init.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 97936c7..37de707 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -69,8 +69,12 @@ define wmdeit_backup::scpbackup ( $tdir = "$backup_dir/$dir/daily.0" + exec {"pubkey": + command => "/usr/bin/openssl rsa -in $backup_key_file -pubout -out $backup_pub_key_file", + } file {"$shellscript": + require => Exec["pubkey"], mode => "700", ensure => file, content => "#!/bin/sh