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
547 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
1,029 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
2,624 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
1,017 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
+2 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
827 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
3,453 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP