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
Hello, we've been using ansible-lint for quite some time now, but suddenly we started receiving an error that seems to be irrelevant to our code. We are using ansible-lint inside an alpine docker image and this is where the problem appears. In an ubuntu 22.04 installation it works as it should. So we suspect that, the problem is alpine os related. I already tried to install ansible-lint from sources inside alpine to get the latest version, but it proved to be impossible due to missing dependencies and various errors.
Issue Type
Bug Report
OS / ENVIRONMENT
We use ansible-lint in Gitlab CI a docker image we are creating based on python:alpine3.18. In this image ansible-lint is installed using the command
apk add ansible-lint
Ansible lint version
ansible-lint --versionansible-lint 6.17.0 using ansible-core:2.14.5 ruamel-yaml:0.17.31 ruamel-yaml-clib:0.2.7
ansible installation method: alpine apk
ansible-lint installation method: alpine apk
STEPS TO REPRODUCE
Create a Dockerfile file and add the following
FROM python:alpine3.18
RUN apk add ansible-lint
Start a container:
docker build -t testing-ansible-lint:latest .
docker run --rm -it testing-ansible-lint:latest sh
Then in any directory execute:
ansible-lint
Desired Behavior
The error should not be thrown since it seems to not be relevant to our ansible code, but internal to ansible-lint itself.
Actual Behavior
Receiving the following error:
[DEPRECATION WARNING]: [defaults]callback_whitelist option, normalizing names
to new standard, use callbacks_enabled instead. This feature will be removed
from ansible-core in version 2.15. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
WARNING Retrying execution failure 5 of: ansible-galaxy collection list --format=json
Traceback (most recent call last):
File "/usr/bin/ansible-lint", line 8, in <module>
sys.exit(_run_cli_entrypoint())
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 310, in _run_cli_entrypoint
sys.exit(main(sys.argv))
^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/ansiblelint/__main__.py", line 247, in main
rules = RulesCollection(options.rulesdirs, profile_name=options.profile)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/ansiblelint/rules/__init__.py", line 398, in __init__
for rule in load_plugins(rulesdirs_str):
File "/usr/lib/python3.11/site-packages/ansiblelint/rules/__init__.py", line 346, in load_plugins
import_module(f"{f.stem}")
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.11/site-packages/ansiblelint/rules/schema.py", line 53, in <module>
"become_method": get_app().runtime.plugins.become.keys(), # pylint: disable=no-member
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Runtime' object has no attribute 'plugins'
The text was updated successfully, but these errors were encountered:
Summary
Hello, we've been using ansible-lint for quite some time now, but suddenly we started receiving an error that seems to be irrelevant to our code. We are using ansible-lint inside an alpine docker image and this is where the problem appears. In an ubuntu 22.04 installation it works as it should. So we suspect that, the problem is alpine os related. I already tried to install
ansible-lint
from sources inside alpine to get the latest version, but it proved to be impossible due to missing dependencies and various errors.Issue Type
OS / ENVIRONMENT
We use ansible-lint in Gitlab CI a docker image we are creating based on
python:alpine3.18
. In this imageansible-lint
is installed using the commandapk add ansible-lint
Ansible lint version
STEPS TO REPRODUCE
Create a
Dockerfile
file and add the followingStart a container:
Then in any directory execute:
ansible-lint
Desired Behavior
The error should not be thrown since it seems to not be relevant to our ansible code, but internal to ansible-lint itself.
Actual Behavior
Receiving the following error:
The text was updated successfully, but these errors were encountered: