From f4bbf4373b17b2c932822a4ee98d0a0f00e4d2af Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Wed, 7 Apr 2021 15:27:40 +0100 Subject: [PATCH] Recommend using pipx to install ansible-lint --- docs/installing.rst | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/installing.rst b/docs/installing.rst index 32349469993..2b74e7e23ec 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -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. @@ -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 isolates the linter from your current python environment automatically. + .. 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 -----------