Installing on Windows is not supported because we use symlinks inside Python packages.
# replace docker with podman docker run -h toolset -it quay.io/ansible/toolset ansible-lint --version
The default installation of the ansible-lint package no longer installs any specific version of Ansible. You need to either install the desired version of Ansible yourself or mention one of the helper extras:
core- will install the latest version of ansible-base 2.10
community- will install the latest version of ansible 2.10 with community collections
You can use either pip3 or pipx to install it; the latter one
automatically isolates the linter from your current python environment.
That approach may avoid having to deal with particularities of installing
python packages, like creating a virtual environment, activating it, installing
--user or fixing potential conflicts if not using virtualenvs.
# Assuming you already installed Ansible and you also want the optional # yamllint support: pip3 install "ansible-lint[yamllint]" # If you want to install and use the latest Ansible (w/o community collections) pip3 install "ansible-lint[core,yamllint]" # If you want to install and use the latest Ansible with community collections pip3 install "ansible-lint[community,yamllint]" # If you want to install an older version of Ansible 2.9 pip3 install ansible-lint "ansible>=2.9,<2.10"