Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot encrypt using ansible 2.9.11 with vault_password_file set in ansible.cfg #19

Open
DutchessNicole opened this issue Jul 30, 2020 · 0 comments

Comments

@DutchessNicole
Copy link

Hi.

I use ansible 2.9.11 and have set up the ansible.cfg to read a password file in my home directory.
Additionally, I use Sublimetext3 with this ansible_vault plugin, and I have the plugin configured to read the same password file.

Since the upgrade for ansible, I cannot encrypt any files anymore: I get the message
ERROR! The vault-ids default,default are available to encrypt. Specify the fault-id to encrypt with --encrypt-vault-id.

Screenshot from 2020-07-30 10-37-34

This seems to be due to the fact that ansible-vault reads the ansible.cfg, spots the vault_password_file parameter, and creates a default vault-id; then it reads the command line options given in the plugin, which also creates a vault-id with the same name, and then it can't choose which one to use.

I can remove the line in ansible.cfg but that means all my CLI scripting stops working, so I don't want to do that.
If I remove the ST configuration line, this plugin asks me for the password, so that doesn't work either.

Is there a way to have the plugin detect whether there is already a default vault-id available and have it skip initializing another one?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant