How to encrypt and existing file using Ansible Vault?

0 votes
How to encrypt and existing file using Ansible Vault?
Jan 29, 2019 in Ansible by Kyraa
997 views

1 answer to this question.

0 votes

Hey @Kyraa, to encrypt an existing file using Ansible Vault, you could use the ansible-vault command. It'll promt you for a password and then again to confirm the password. 

Something like this:

# Encrypt a role's defaults/main.yml file 
ansible-vault encrypt defaults/main.yml 
> New Vault password: 
> Confirm New Vault password: 
> Encryption successful
answered Jan 29, 2019 by Kavya

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
123 views
0 votes
1 answer
0 votes
1 answer
+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,400 points
412 views
0 votes
1 answer
+1 vote
1 answer

Is it possible to append a large amount of text to a file using Ansible?

Here is concept which you can follow. blockinfile is ...READ MORE

answered Jul 30, 2018 in Ansible by Atul
• 10,250 points
4,295 views
0 votes
1 answer

How do I wget a file from web server using shell in the ansible playbook

Hey Ayaan, you could probably use this ...READ MORE

answered Jan 24, 2019 in Ansible by Anushri
955 views