You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ansible-lint as part of my pre-commit hooks. Today I bumped the hooks versions (i.e. pre-commit autoupdate) and ansible-lint started to fail.
The previous version was v6.15.0 and it worked fine, but with v6.21.1 it started failing because it doesn't download the roles and collections listed in ansible/requirements.yml.
As a workaround, if I move requirements.yml to the project root directory, it works. But as I said, it was working as expected with previous versions. It seems that --project-dir=ansible is not working anymore, but on the other side, setting any value makes ansible-lint fail with the proper error message: Failed to determine a valid project_dir.
Issue Type
Bug Report
OS / ENVIRONMENT
ansible-lint --versionv6.21.1
ansible installation method: one of source, pip, OS package
ansible-lint installation method: one of source, pip, OS package
STEPS TO REPRODUCE
Use the above pre-commit configuration in any ansible project located in a subfolder, depending on any collection or role.
Desired Behavior
Honor the --project-dir flag to use this value as the ansible project root directory.
Possible security bugs should be reported via email to security@ansible.com
Summary
I'm using
ansible-lint
as part of my pre-commit hooks. Today I bumped the hooks versions (i.e.pre-commit autoupdate
) andansible-lint
started to fail.Project structure
. ├── ansible │ ├── ansible.cfg │ ├── hosts.ini │ ├── host_vars │ ├── README.md │ ├── requirements.yml │ ├── roles │ ├── .ansible-lint │ └── vars ├── .pre-commit-config.yaml └── ...
The previous version was
v6.15.0
and it worked fine, but withv6.21.1
it started failing because it doesn't download the roles and collections listed inansible/requirements.yml
.As a workaround, if I move
requirements.yml
to the project root directory, it works. But as I said, it was working as expected with previous versions. It seems that--project-dir=ansible
is not working anymore, but on the other side, setting any value makesansible-lint
fail with the proper error message:Failed to determine a valid project_dir
.Issue Type
OS / ENVIRONMENT
STEPS TO REPRODUCE
Use the above pre-commit configuration in any ansible project located in a subfolder, depending on any collection or role.
Desired Behavior
Honor the
--project-dir
flag to use this value as the ansible project root directory.Possible security bugs should be reported via email to
security@ansible.com
Actual Behavior
Please give some details of what is happening.
Include a minimum complete verifiable example with:
ansible-playbook --syntax-check playbook
Related: ansible/ansible-compat#343
The text was updated successfully, but these errors were encountered: