Questions tagged [ansible-vault]

For questions about Ansible Vault - an Ansible feature that allows keeping sensitive data in encrypted files rather than in plain text in various configuration files.

Filter by
Sorted by
Tagged with
2 votes
2 answers

Use an asymmetric cypher to secure Ansible vault

I'm trying to develop a Playbook which must handle sensitive user data (SSH keys, Registry credentials, etc.). Only a user and the Ansible controller can see the data associated with that same user. ...
Adrien H's user avatar
  • 121
4 votes
1 answer

How to ansible-vault files as they are commited to Git

I'm trying to use ansible-vault to secure the secret files in my project before I push them to Git. There's loads of advice out there on how to set this up in part, but everything I've read is ...
Jim ReesPotter's user avatar
3 votes
2 answers

How to store/retrieve multiple ansible-vault passwords within/from a single file

Update: As @yaobin pointed out. It appears they removed the part about the multiple passwords being in a single file. It was here as can be seen from web archive:
yurtesen's user avatar
  • 130
4 votes
2 answers

Including vault-encrypted variables in a task

I just recently started to use Ansible, and am trying to deploy a configuration file that contains a secret key and email (for credentials to use with an API). I encrypted them with ansible-vault ...
Lucky The Rabbit's user avatar
1 vote
1 answer

ansible-pull ignore group_vars vault

How do I ignore the group_vars vault file when running ansible-pull? My repository (among other stuff) does machine init, joining the domain and software updates. I would like the software part to be ...
Frank Vermeulen's user avatar
1 vote
0 answers

Per machine credentials for privileges escalation using AWX [duplicate]

I have an inventory with a lot of hosts in it using the same credentials, but one host needs a different approach. For the ssh connection a different user is used, after the connection is established, ...
Jonas Hüsser's user avatar
13 votes
2 answers

How do I run Ansible Azure playbooks while avoiding storing credentials in files?

Background We use Ansible to provision and manage Azure infrastructure. At the moment we run Ansible "manually" i.e. we manually execute playbooks for various automated tasks. No CI infrastructure. ...
Vish's user avatar
  • 601
34 votes
5 answers

Where to put ansible-vault password

We are planning to use ansible vault in our project to prevent leaking passwords or keys in git. The idea is to put all our sensitive data into a plain file then encrypt this file with ansible-vault ...
storm's user avatar
  • 1,759
8 votes
2 answers

What are best practices of structuring encrypting variables since Ansible 2.3.0?

This document indicates that since Ansible 2.3 it should be possible to encrypt certain vars using a !vault | prefix instead of putting a variable and keys in a vault file and encrypt it completely. ...
030's user avatar
  • 13.2k
10 votes
3 answers

Why could the encrypted Ansible files not be decrypted although the vault password file has been set?

Follow-up to this Q&A. According to this and this documentation it should be possible to define a default vault password file by specifying vault_password_file = ~/.vault_pass.txt in one of the ...
030's user avatar
  • 13.2k
17 votes
3 answers

What are best practices for using Ansible Vault on public CI's and Source Control Repositories like BitBucket?

Introduction On a private CI's and Source Control Repositories like Gitlab-ce it is possible to copy an ~/.vault_pass.txt to the server and let it use by the CI to decrypt files using Ansible. ...
030's user avatar
  • 13.2k
23 votes
1 answer

Git clean/smudge filters for ansible vault secrets

I am trying to setup clean/smudge filter in git to have automatic encrypting and decrypting of files containing secrets thru ansible-vault command. Peculiarity of the ansible-vault command is that it ...
ᴳᵁᴵᴰᴼ's user avatar