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, 2019 in Ansible by Neha
50 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, 2019 by Nish

Related Questions In Ansible

0 votes
1 answer

How to create a new encrpted file using Ansible Vault?

If you are creating a new file ...READ MORE

answered Jan 29, 2019 in Ansible by Kyraa
137 views
0 votes
2 answers

Encrypt a single variable using ansible Vault

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

answered Jan 29, 2019 in Ansible by Sid
740 views
0 votes
1 answer

Upload encrypted file using ansible vault?

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

answered Jan 29, 2019 in Ansible by Faizal
79 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
495 views
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, 2019 in Ansible by Kavya
133 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, 2019 in Ansible by Kavya
1,170 views