-
Notifications
You must be signed in to change notification settings - Fork 664
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
exception from JinjaRule and VariableNamingRule due to vault password #2443
Comments
I noticed that the examples using ansible-vault (e.g. https://github.com/ansible/ansible-lint/blob/main/examples/playbooks/contains_secrets.yml) only encrypt individual variables; however, this bug report refers to I should note that I see the exact same issue, and I am using vault files as well. |
I also encountered this behaviour. I set up my inventory variables following the advice in the playbook best practices at https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html#keep-vaulted-variables-safely-visible . I have a
In order to facilitate the usage of the command line tools like As I think I'm following a best practice approach here, I'm a bit puzzled that
|
Problem still exists in
|
This issue still exist in 6.18.0 |
Still present in v6.20.0 According to the source it looks like it should pass a dummy value of ansible-lint/src/ansiblelint/utils.py Lines 72 to 75 in e6bc4c7
It seems that the issue is occurring when specifying the value in an Didn't have any issues using this action: https://github.com/ansible/ansible-lint-action |
Still present in v6.22.2 I've specified the vault password file in
Is there any solution ? |
Summary
My ansible repo follows the collections directory structure. I have an
ansible.cfg
at the root containing avault_password_file =
entry. If I run anyansible-playbook --check <playbook>
, it works just fine and decrypts the vault. If I runansible-lint
, however, I get a bunch of warnings.I tried setting
ANSIBLE_VAULT_PASSWORD_FILE
as an env var too, but no luck.Initially posted this as a discussion (#2404) but another user is seeing the same thing, and without a smoking gun as far as configuration goes, I'm guessing this is actually a bug.
Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
Debian 11
STEPS TO REPRODUCE
Create a playbook with a vault. Specify the vault password file via env var or ansible.cfg. Run ansible-lint.
Desired Behavior
Runs as expected
Actual Behavior
Running verbose doesn't show anything helpful, just that the errors are caused by my vault files.
The text was updated successfully, but these errors were encountered: