Encryption using vault

0 votes
I've been working with Ansible for a month now. I had a tiny doubt related to the vault. is it possible to encrypt the files using vault, transfer them to a remote server and then decrypt it?
Jan 29 in Ansible by Neha
18 views

1 answer to this question.

0 votes

Hey @Neha, unfortunately, that's not possible. You can't just encrypt files and transfer them. 

But what you can do is, store the encrypted content in a file, assign it to a variable and then use the lookup plugin to get these contents over a remote server. 

Example:
- copy: 
    content: "{{ lookup('file', 'files/nish/nush/secrets') }}" 
    dest: /remote/unencrypted/destination
answered Jan 29 by Nish

Related Questions In Ansible

0 votes
1 answer
0 votes
2 answers

Encrypt a single variable using ansible Vault

Adding to @Zunaid's answer, this can also ...READ MORE

answered Jan 29 in Ansible by Sid
96 views
0 votes
1 answer

Upload encrypted file using ansible vault?

You can do this, make your playbook ...READ MORE

answered Jan 29 in Ansible by Faizal
19 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

What files can be encrypted using the Ansible Vault?

Yes @Umang, Ansible Vault is used to ...READ MORE

answered Jan 29 in Ansible by Kavya
46 views
0 votes
1 answer

How to encrypt and existing file using Ansible Vault?

Hey @Kyraa, to encrypt an existing file ...READ MORE

answered Jan 29 in Ansible by Kavya
238 views