From ba233a0cbad76b4783a03893e7bf4716fbc0f0ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 26 Jun 2024 08:24:58 +0200 Subject: Merging upstream version 24.6.1. Signed-off-by: Daniel Baumann --- docs/installing.md | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) (limited to 'docs/installing.md') diff --git a/docs/installing.md b/docs/installing.md index 6008de7..d8d6586 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -1,3 +1,8 @@ +--- +# YAML header +render_macros: true +--- + # Installing Install Ansible-lint to apply rules and follow best practices with your @@ -13,9 +18,9 @@ automation content. this document. Before raising any bugs related to installation, review all of the following details: - - You should use installation methods outlined in this document only. + - You should use the installation methods outlined in this document only. - You should upgrade the Python installer (`pip` or `pipx`) to the latest - version available from pypi.org. If you used a system package manager, you + version available from pypi.org. If you use a system package manager, you will need to upgrade the installer to a newer version. - If you are installing from a git zip archive, which is not supported but should work, ensure you use the main branch and the latest version of pip and @@ -27,20 +32,23 @@ automation content. [discussion](https://github.com/ansible/ansible-lint/discussions/2820#discussioncomment-4400380). Pull requests to improve installation instructions are welcome. Any new issues - related to installation will be closed and locked. + related to the installation will be closed and locked. For a container image, we recommend using -[creator-ee](https://github.com/ansible/creator-ee/), which includes -Ansible-lint. If you have a use case that the `creator-ee` container doesn't -satisfy, please contact the team through the -[discussions](https://github.com/ansible/ansible-lint/discussions) forum. +[creator-ee](https://github.com/ansible/creator-ee/) which includes +`ansible-dev-tools` (it combines critical Ansible development packages into a +unified Python package). If you have a use case that the `creator-ee` container +doesn't satisfy, please contact the team through the +[discussion](https://github.com/ansible/ansible-lint/discussions) forum. You can also run Ansible-lint on your source code with the -[Ansible-lint GitHub action](https://github.com/marketplace/actions/ansible-lint) +[Ansible-lint GitHub action](https://github.com/marketplace/actions/run-ansible-lint) instead of installing it directly. ## Installing the latest version +{{ install_from_adt("ansible-lint") }} + You can install the most recent version of Ansible-lint with the [pip3] or [pipx] Python package manager. Use [pipx] to isolate Ansible-lint from your current Python environment as an alternative to creating a virtual environment. @@ -50,6 +58,16 @@ current Python environment as an alternative to creating a virtual environment. pip3 install ansible-lint ``` +!!! note + + If you want to install the exact versions of all dependencies that were used to + test a specific version of ansible-lint, you can add `lock` extra. This will + only work with Python 3.10 or newer. Do this only inside a virtual environment. + + ```bash + pip3 install "ansible-lint[lock]" + ``` + ## Installing on Fedora and RHEL You can install Ansible-lint on Fedora, or Red Hat Enterprise Linux (RHEL) with @@ -95,16 +113,17 @@ jobs: name: Ansible Lint # Naming the build is important to use it as a status check runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 - name: Run ansible-lint uses: ansible/ansible-lint@v6 ``` Due to limitations on how GitHub Actions are processing arguments, we do not plan to provide extra options. You will have to make use of -[ansible-lint own configuration file](https://ansible-lint.readthedocs.io/configuring/) -for altering its behavior. +[ansible-lint own configuration file](https://ansible.readthedocs.io/projects/lint/configuring/) +to alter its behavior. -To also enable [dependabot][dependabot] automatic updates the newer versions of +To also enable [dependabot][dependabot] automatic updates, the newer versions of ansible-lint action you should create a file similar to [.github/dependabot.yml][.github/dependabot.yml] -- cgit v1.2.3