Skip to content

Commit

Permalink
Recommend using pipx to install ansible-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Apr 7, 2021
1 parent 38a5dea commit 660e66a
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions docs/installing.rst
Expand Up @@ -11,7 +11,7 @@ Installing
Installing on Windows is not supported because we use symlinks inside Python
packages.

While our project does not directly ships a container, the
While our project does not directly ship a container, the
tool is part of the toolset_ container. Please avoid raising any bugs
related to containers and use the discussions_ forum instead.

Expand All @@ -25,32 +25,36 @@ related to containers and use the discussions_ forum instead.

.. note::

The default installation of ansible-lint package no longer installs any
specific version of ansible. You need to either install the desired 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 latest version of ansible-base 2.10
* ``community`` - will install latest version of ansible 2.10 with community collections
* ``core`` - will install the latest version of ansible-base 2.10
* ``community`` - will install the latest version of ansible 2.10 with community collections

Using Pip
---------

While you can use `pip3` to install it, we do recommend using pipx_ as this
tool automatically isolates the linter from your current python environment.

.. code-block:: bash
# Assuming you already installed ansible and you also want the optional
# Assuming you already installed Ansible and you also want the optional
# yamllint support:
pip install "ansible-lint[yamllint]"
pipx install "ansible-lint[yamllint]"
# If you want to install and use latest ansible (w/o community collections)
# If you want to install and use the latest Ansible (w/o community collections)
pip install "ansible-lint[core,yamllint]"
# If you want to install and use latest ansible with community collections
pip install "ansible-lint[community,yamllint]"
# If you want to install and use the latest Ansible with community collections
pipx install "ansible-lint[community,yamllint]"
# If you want to install an older version of Ansible 2.9
pip install ansible-lint "ansible>=2.9,<2.10"
pipx install ansible-lint "ansible>=2.9,<2.10"
.. _installing_from_source:
.. _pipx: https://github.com/pipxproject/pipx

From Source
-----------
Expand Down

0 comments on commit 660e66a

Please sign in to comment.