Skip to content
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

Ansible-lint version is broken #2658

Closed
Igorgro opened this issue Nov 6, 2022 · 2 comments
Closed

Ansible-lint version is broken #2658

Igorgro opened this issue Nov 6, 2022 · 2 comments
Assignees
Labels

Comments

@Igorgro
Copy link

Igorgro commented Nov 6, 2022

Summary

Whan calling ansible-lint --version it fails with error (see below)

Issue Type
  • Bug Report
Ansible and Ansible Lint details
ansible --version
ansible [core 2.13.5]
  config file = /home/igormahov/dev/ansible/miem/devops-collection/ansible.cfg
  configured module search path = ['/home/igormahov/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  ansible collection location = /home/igormahov/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.8 (main, Nov  1 2022, 14:18:21) [GCC 12.2.0]
  jinja version = 3.1.2
  libyaml = True

ansible-lint --version
ansible-lint unknown using ansible 2.13.5
Traceback (most recent call last):
  File "/usr/bin/ansible-lint", line 8, in <module>
    sys.exit(_run_cli_entrypoint())
  File "/usr/lib/python3.10/site-packages/ansiblelint/__main__.py", line 319, in _run_cli_entrypoint
    sys.exit(main(sys.argv))
  File "/usr/lib/python3.10/site-packages/ansiblelint/__main__.py", line 190, in main
    msg = get_version_warning()
  File "/usr/lib/python3.10/site-packages/ansiblelint/config.py", line 253, in get_version_warning
    current_version = Version(__version__)
  File "/usr/lib/python3.10/site-packages/packaging/version.py", line 266, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: 'unknown'
  • ansible installation method: Arch Linux pacman package manager
  • ansible-lint installation method: Arch Linux pacman package manager
OS / ENVIRONMENT

OS: Arch Linux

STEPS TO REPRODUCE

Just install ansible and ansible-lint using pacman

Desired Behavior

Ansible lint prints correct version

Actual Behavior

The exception is thrown, see tracebback above

@Igorgro Igorgro added bug new Triage required labels Nov 6, 2022
@ssbarnea ssbarnea self-assigned this Nov 21, 2022
@ssbarnea ssbarnea removed the new Triage required label Nov 21, 2022
@ssbarnea
Copy link
Member

pacman is not a supported installation method, so I will have to close this bug as won't fix. Still, we would likely accept a PR that makes it easier to build a pacman package if proposed.

@ssbarnea ssbarnea closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2022
@Igorgro
Copy link
Author

Igorgro commented Nov 22, 2022

@ssbarnea I found out that this is caused by missing python-setuptools package. I think it's a problem of arch distribution because this package must depends on python-setuptools

ssbarnea added a commit to ssbarnea/ansible-lint that referenced this issue Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants