How to encrypt and existing file using Ansible Vault?

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

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 by Kavya

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

devops , how to create user using ansible playbook

root doesn't need a password to switch ...READ MORE

answered Jul 16, 2018 in Ansible by Kalgi
• 2,620 points
54 views
+13 votes
2 answers
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,200 points
1,419 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.