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
Invoking ansible-lint 24.9.2 on my example collection, ansible-lint shows warnings about being unable to load module and resolve FQCN for a dependent collection module:
In this example, it's community.general.pip_package_info:
INFO Set ANSIBLE_LIBRARY=/Users/dab/.cache/ansible-compat/0cb87f/modules:/Users/dab/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Set ANSIBLE_ROLES_PATH=/Users/dab/.cache/ansible-compat/0cb87f/roles:roles:/Users/dab/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Provisioning collection community.general:10.0.1 from galaxy.yml
INFO Running from /Users/dab/repos/repro/ansible : ansible-galaxy collection install -vvv community.general:10.0.1
INFO Running from /Users/dab/repos/repro/ansible : ansible-galaxy collection install -vvv --force /Users/dab/repos/repro/ansible
WARNING Unable to load module community.general.pip_package_info at roles/example/tasks/main.yml:3 for options validation
WARNING Unable to resolve FQCN for module community.general.pip_package_info
The dependent collection is successfully installed to the ansible-compat cache during the initial run:
❯ ls -lah /Users/dab/.cache/ansible-compat/0cb87f/collections/ansible_collections
Permissions Size User Date Modified Name
drwxr-xr-x - dab 11 Nov 21:21 community
drwxr-xr-x - dab 11 Nov 21:21 community.general-10.0.1.info
drwxr-xr-x - dab 11 Nov 21:21 dbrennand
This only happends on the first run of ansible-lint, once the ~/.cache/ansible-compat/ is established, the warning disappears. This is not ideal when running ansible-lint in one-shot scenarios such as a CI/CD pipeline.
Issue Type
Bug Report
OS / ENVIRONMENT
ansible-lint 24.9.2 using ansible-core:2.18.0 ansible-compat:24.9.1 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.12
❯ ansible-lint -v
INFO Identified /Users/dab/repos/repro as project root due .git directory.
INFO Set ANSIBLE_LIBRARY=/Users/dab/.cache/ansible-compat/0cb87f/modules:/Users/dab/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Set ANSIBLE_ROLES_PATH=/Users/dab/.cache/ansible-compat/0cb87f/roles:roles:/Users/dab/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Provisioning collection community.general:10.0.1 from galaxy.yml
INFO Running from /Users/dab/repos/repro/ansible : ansible-galaxy collection install -vvv community.general:10.0.1
INFO Running from /Users/dab/repos/repro/ansible : ansible-galaxy collection install -vvv --force /Users/dab/repos/repro/ansible
INFO Executing syntax check on playbook roles/example/tests/test.yml (0.24s)
INFO Executing syntax check on role roles/example (0.24s)
...
WARNING Unable to load module community.general.pip_package_info at roles/example/tasks/main.yml:3 for options validation
WARNING Unable to resolve FQCN for module community.general.pip_package_info
The text was updated successfully, but these errors were encountered:
#4402 is likely to fix that. Either update ansible-compat manually and test again or wait till we make the next linter release and check if this is sorted.
Summary
Invoking ansible-lint
24.9.2
on my example collection, ansible-lint shows warnings about being unable to load module and resolve FQCN for a dependent collection module:In this example, it's
community.general.pip_package_info
:The dependent collection is successfully installed to the ansible-compat cache during the initial run:
This only happends on the first run of ansible-lint, once the
~/.cache/ansible-compat/
is established, the warning disappears. This is not ideal when runningansible-lint
in one-shot scenarios such as a CI/CD pipeline.Issue Type
OS / ENVIRONMENT
ansible-lint 24.9.2 using ansible-core:2.18.0 ansible-compat:24.9.1 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.12
STEPS TO REPRODUCE
Desired Behavior
No warnings are shown and the module and FQCN are resolved.
Actual Behavior
Minimal repro example:
The text was updated successfully, but these errors were encountered: