Encryption fails if ansible fault file is specified in ansible.cfg
Please see issue reported on Ansible's Repo: https://github.com/ansible/ansible/issues/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?
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.
Seems to be a limitation of ansible-vault not this plugin
https://docs.ansible.com/ansible/latest/user_guide/vault.html
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
I had a similar problem and solve with PR #32.
My ansible.cfg is in /etc/ansible/ansible.cfg and has vault_password_file.