-
Notifications
You must be signed in to change notification settings - Fork 635
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
offline mode still calling ansible-galaxy #2042
Comments
Looking a bit further this seems to have been ripped out together with the prerun library. I assume that |
Even further digging: The issue seems to be in a different repository alltogether: (called in ansible-lint/src/ansiblelint/app.py Line 209 in 61ed3ea
As soon as a file named |
commenting merely to subscribe this this individual issue. EDIT: For what it is worth, as this may help others until this is resolved: My workaround was to merely rename |
Apparently this was broken on purpose here: ansible/ansible-compat#37 |
If that is the case, then I would argue that the |
I'd rather see it fixed, it is a non-starter for a linter to access resources on some foreign host upon every single invocation. |
Same here, but I have a feeling that the maintainers are not interested in keeping this feature around, sadly. |
Well, https://github.com/ansible/ansible-compat is (theoretically?) maintained by IBM/Red Hat, not the Ansible community, even though the license file in there says otherwise? It is a bit confusing which functionality should go where, but all in all this is something that needs to be fixed as it also currently breaks my CI runs if I don't apply workarounds AND it also will cause a lot of completely unnecessary traffic for galaxy. Either I break convention by renaming |
Offline mode is here to stay, the fact that is does not work well is a bug. |
Fixes: ansible#2042
Fixes: ansible#2042
Fixes: ansible#2042
Fixes: ansible#2042
Fixes: ansible#2042
Fixes: ansible#2042
Summary
No matter if specified on the command line or in the config file, ansible-lint tries to call
ansible-galaxy
Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
Ubuntu 18.04 with Python 3.8
STEPS TO REPRODUCE
No matter if called without any config file (the actual one has a
.yml
ending to make it easier forpre-commit
...)or with the config file, containing
offline: true
In both cases
ansible-lint
calls out toansible-galaxy collection install
which is definitely not what it should do. Collections are managed by me and I don't want the linter to change anything on disk. I also want to be very explicit about which collections are installed, the above command will automatically also install (unpinned!) dependencies of collections for example. Lastly, this is the wrong path to install collections to or look for them, as you can see in the output ofansible --version
above. Collections are vendored in the folder and this is also specified in the ansible.cfg right there.Desired Behavior
No calls to
ansible-galaxy
(and no internet communication at all actually) when specifying--offline
.Actual Behavior
See above, apparently it tries to install collections to some
~/.cache
folder that can't be set using the config file of ansible-lint (https://ansible-lint.readthedocs.io/en/latest/configuring/) and that shouldn't happen anyways.The text was updated successfully, but these errors were encountered: