Skip to content

Commit

Permalink
Suggest adt installation (ansible#4071)
Browse files Browse the repository at this point in the history
  • Loading branch information
audgirka authored Mar 20, 2024
1 parent ce2ebd7 commit e91ced9
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions docs/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,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
Expand All @@ -30,17 +30,32 @@ automation content.
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/run-ansible-lint)
instead of installing it directly.

## Installing the latest version

!!! Recommendation

The **recommended** approach to install `ansible-lint` is using the
`ansible-dev-tools` package.
[Ansible Development Tools (ADT)](https://ansible.readthedocs.io/projects/dev-tools/)
aims to streamline the setup and usage of several tools needed in order to
create [Ansible](https://www.ansible.com) content. ADT combines critical Ansible
development packages into a unified Python package.

```bash
# This also installs ansible-core if it is not already installed
pip3 install ansible-dev-tools
```

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.
Expand All @@ -52,10 +67,9 @@ 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.
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]"
Expand Down Expand Up @@ -114,9 +128,9 @@ jobs:
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.readthedocs.io/projects/lint/configuring/)
for altering its behavior.
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]
Expand Down

0 comments on commit e91ced9

Please sign in to comment.