I want to encrypt a file on a remote host. I was looking through the existing modules and couldn’t find any that is able to do that?
My use case is that I want to create a backup (tar file) on a remote host, encrypt the backup archive and upload it to some storage.
I’m aware of Ansible vault, but it’s intended purpose is for encrypting secrets etc. to use it in the playbook and not encrypting a remote file.
Maybe someone has a suggestion.
Thanks!
~ Roman
I want to encrypt a file on a remote host. I was looking through the existing modules and couldn't find any that is able to do that?
My use case is that I want to create a backup (tar file) on a remote host, encrypt the backup archive and upload it to some storage.
I'm aware of Ansible vault, but it's intended purpose is for encrypting secrets etc. to use it in the playbook and not encrypting a remote file.
Maybe someone has a suggestion.
Thanks!
~ Roman
Is it OK for an unencrypted copy of the backup to live on the to live on the remote storage, where it could be encrypted and uploaded? Ansible can have access to zip or GPG keys configured, especially publishing pubic GPG keys for use on the server that hosts the unencrypted file. The GPG public key need not be a secret: it could be published to the remote host to encrypt the file locally before upload.