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

Encryption fails if ansible fault file is specified in ansible.cfg #26

Open
bcharboneauiherb opened this issue Jan 14, 2019 · 4 comments

Comments

@bcharboneauiherb
Copy link

Please see issue reported on Ansible's Repo: ansible/ansible#46310

if vault file path is defined in ansible.cfg --vault-password-file should not be specified on the commandline otherwise encrypt will stop functioning from the extension.

Can the extension be made to only include --vault-password-file="" if the field in the extension settings is populated?

@michaelpporter
Copy link

I see in #9 the function was added to prefer the settings in ansible.cfg. We use AWX and have a different path in the ansible.cfg from local. Could a setting be added to prefer workspace over the file? To me the developer should be able to create local overrides without changing the global function.

michaelpporter added a commit to michaelpporter/vscode-ansible-vault that referenced this issue Mar 8, 2019
To address dhoeric#26 added a flag to perfer user config over ansible.cfg.
Best for workspace settings
@michaelpporter
Copy link

Seems to be a limitation of ansible-vault not this plugin

https://docs.ansible.com/ansible/latest/user_guide/vault.html

@michaelpporter
Copy link

Example of how you can not override ansible.cfg setting:

vault_password_file=/etc/awx/vault-pass
ansible-vault decrypt "vars.yml" --vault-password-file="vault-pass"
ERROR! The vault password file /private/etc/awx/vault-pass was not found

@danielcrisap
Copy link

I had a similar problem and solve with PR #32.

My ansible.cfg is in /etc/ansible/ansible.cfg and has vault_password_file.

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

3 participants