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
poetry: 1.8.5
OS: macOS 15.2 poetry add -G dev "ansible-lint@latest"
Error:
Using version ^24.12.2 for ansible-lint
Updating dependencies
Resolving dependencies... (0.1s)
Because no versions of ansible-lint match >24.12.2,<25.0.0
and ansible-lint (24.12.2) depends on will-not-work-on-windows-try-from-wsl-instead (*), ansible-lint (>=24.12.2,<25.0.0) requires will-not-work-on-windows-try-from-wsl-instead (*).
So, because no versions of will-not-work-on-windows-try-from-wsl-instead match *
and infrastructure depends on ansible-lint (^24.12.2), version solving failed.
poetry show:
poetry show ansible-lint
name : ansible-lint
version : 6.8.7
description : Checks playbooks for practices and behavior that could potentially be improved
dependencies
- ansible-compat >=2.2.5
- ansible-core >=2.12.0
- black >=22.1.0
- filelock *
- jsonschema >=4.17.0
- packaging *
- pyyaml >=5.4.1
- rich >=12.6.0
- ruamel.yaml >=0.17.21,<0.18
- wcmatch >=8.4.1
- yamllint >=1.28.0
required by
- ansible-dev-tools *
But if install poetry add -G dev "ansible-dev-tools@latest" - success
That doesn't work if use poetry run ansible-lint
Traceback (most recent call last):
File "/Users/arexils/Library/Caches/pypoetry/virtualenvs/infrastructure-zGOCBRAd-py3.12/bin/ansible-lint", line 8, in <module>
sys.exit(_run_cli_entrypoint())
^^^^^^^^^^^^^^^^^^^^^
File "/Users/arexils/Library/Caches/pypoetry/virtualenvs/infrastructure-zGOCBRAd-py3.12/lib/python3.12/site-packages/ansiblelint/__main__.py", line 319, in _run_cli_entrypoint
sys.exit(main(sys.argv))
^^^^^^^^^^^^^^
File "/Users/arexils/Library/Caches/pypoetry/virtualenvs/infrastructure-zGOCBRAd-py3.12/lib/python3.12/site-packages/ansiblelint/__main__.py", line 181, in main
initialize_options(argv[1:])
File "/Users/arexils/Library/Caches/pypoetry/virtualenvs/infrastructure-zGOCBRAd-py3.12/lib/python3.12/site-packages/ansiblelint/__main__.py", line 104, in initialize_options
options.cache_dir = get_cache_dir(options.project_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/arexils/Library/Caches/pypoetry/virtualenvs/infrastructure-zGOCBRAd-py3.12/lib/python3.12/site-packages/ansible_compat/prerun.py", line 14, in get_cache_dir
basename = project_dir.resolve().name.encode(encoding="utf-8")
^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'resolve'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
poetry: 1.8.5
OS: macOS 15.2
poetry add -G dev "ansible-lint@latest"
Error:
poetry show:
But if install
poetry add -G dev "ansible-dev-tools@latest"
- successThat doesn't work if use
poetry run ansible-lint
Beta Was this translation helpful? Give feedback.
All reactions