-
Notifications
You must be signed in to change notification settings - Fork 636
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
Custom ansible root dir breaks requirements resolution #3863
Labels
Comments
This was referenced Nov 21, 2023
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
[email protected]
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: