Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ansible-lint-ignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# See https://ansible.readthedocs.io/projects/lint/configuring/#ignoring-rules-for-entire-files
# See https://docs.ansible.com/projects/lint/configuring/#ignoring-rules-for-entire-files
playbook2.yml package-latest # comment
playbook2.yml foo-bar
2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Community Code of Conduct

Please see the official
[Ansible Community Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
[Ansible Community Code of Conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html).
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ contact_links:
url: https://github.com/ansible/ansible-lint/discussions/
about: Any kind of questions should go on the forum.
- name: Security bug report
url: https://docs.ansible.com/ansible/latest/community/reporting_bugs_and_features.html
url: https://docs.ansible.com/projects/ansible/latest/community/reporting_bugs_and_features.html
about: |
Please learn how to report security vulnerabilities here.

For all security related bugs, email [email protected]
instead of using this issue tracker and you will receive
a prompt response.

For more information, see https://docs.ansible.com/ansible/latest/community/reporting_bugs_and_features.html
For more information, see https://docs.ansible.com/projects/ansible/latest/community/reporting_bugs_and_features.html
- name: Ansible Code of Conduct
url: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
url: https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html
about: Be nice to other members of the community. Behave.
4 changes: 2 additions & 2 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ policy. Please find more information in [our docs].
## Reporting a Vulnerability

We encourage responsible disclosure practices for security
vulnerabilities. Please read our [policies for reporting bugs](https://docs.ansible.com/ansible/devel/community/reporting_bugs_and_features.html#reporting-a-bug)
vulnerabilities. Please read our [policies for reporting bugs](https://docs.ansible.com/projects/ansible/devel/community/reporting_bugs_and_features.html#reporting-a-bug)
if you want to report a security issue that might affect Ansible.

[our docs]: https://docs.ansible.com/ansible-core/devel/reference_appendices/release_and_maintenance.html#ansible-core-release-cycle
[our docs]: https://docs.ansible.com/projects/ansible-core/devel/reference_appendices/release_and_maintenance.html#ansible-core-release-cycle
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![PyPI version](https://img.shields.io/pypi/v/ansible-lint.svg)](https://pypi.org/project/ansible-lint)
[![Ansible-lint rules explanation](https://img.shields.io/badge/Ansible--lint-rules-blue.svg)](https://ansible.readthedocs.io/projects/lint/rules/)
[![Ansible-lint rules explanation](https://img.shields.io/badge/Ansible--lint-rules-blue.svg)](https://docs.ansible.com/projects/lint/rules/)
[![Discussions](https://img.shields.io/badge/Discussions-gray.svg)](https://forum.ansible.com/tag/ansible-lint)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

Expand All @@ -9,7 +9,7 @@
potentially be improved. As a community-backed project ansible-lint supports
only the last two major versions of Ansible.

[Visit the Ansible Lint docs site](https://ansible.readthedocs.io/projects/lint/)
[Visit the Ansible Lint docs site](https://docs.ansible.com/projects/lint/)

# Using ansible-lint as a GitHub Action

Expand Down Expand Up @@ -60,11 +60,11 @@ For more details, see [ansible-lint-action].
# Communication

Refer to the
[Talk to us](https://ansible.readthedocs.io/projects/lint/contributing/#talk-to-us)
[Talk to us](https://docs.ansible.com/projects/lint/contributing/#talk-to-us)
section of the Contributing guide to find out how to get in touch with us.

You can also find more information in the
[Ansible communication guide](https://docs.ansible.com/ansible/devel/community/communication.html).
[Ansible communication guide](https://docs.ansible.com/projects/ansible/devel/community/communication.html).

# Contributing

Expand All @@ -73,7 +73,7 @@ Please read [Contribution guidelines] if you wish to contribute.
# Code of Conduct

Please see the
[Ansible Community Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
[Ansible Community Code of Conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html).

# Licensing

Expand All @@ -91,11 +91,11 @@ by [Red Hat] project.

[ansible]: https://ansible.com
[contribution guidelines]:
https://ansible.readthedocs.io/projects/lint/contributing
https://docs.ansible.com/projects/lint/contributing
[gplv3]: https://github.com/ansible/ansible-lint/blob/main/COPYING
[mit]:
https://github.com/ansible/ansible-lint/blob/main/docs/licenses/LICENSE.mit.txt
[red hat]: https://redhat.com
[will thames]: https://github.com/willthames
[ansible-lint-action]:
https://ansible.readthedocs.io/projects/lint/installing/#installing-from-source-code
https://docs.ansible.com/projects/lint/installing/#installing-from-source-code
10 changes: 5 additions & 5 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ community.
announcements including social events.

To get release announcements and important changes from the community, see the
[Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn).
[Bullhorn newsletter](https://docs.ansible.com/projects/ansible/devel/community/communication.html#the-bullhorn).

For a live chat experience join
the [#devtools:ansible.com](https://matrix.to/#/#devtools:ansible.com)
Matrix room.

You can find more information in the
[Ansible communication guide](https://docs.ansible.com/ansible/devel/community/communication.html).
[Ansible communication guide](https://docs.ansible.com/projects/ansible/devel/community/communication.html).

Possible security bugs should be reported via email to
<mailto:[email protected]>.
Expand All @@ -69,14 +69,14 @@ Possible security bugs should be reported via email to
As with all Ansible projects, we have a [Code of Conduct].

[ansible communication]:
https://docs.ansible.com/ansible/latest/community/communication.html
https://docs.ansible.com/projects/ansible/latest/community/communication.html
[code of conduct]:
https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html
[creating your fork on github]:
https://docs.github.com/en/get-started/quickstart/contributing-to-projects
[discussions]: https://github.com/ansible/ansible-lint/discussions
[supported ansible versions]:
https://docs.ansible.com/ansible-core/devel/reference_appendices/release_and_maintenance.html#ansible-core-release-cycle
https://docs.ansible.com/projects/ansible-core/devel/reference_appendices/release_and_maintenance.html#ansible-core-release-cycle
[tox]: https://tox.readthedocs.io

## Module dependency graph
Expand Down
4 changes: 2 additions & 2 deletions docs/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ automation content.
related to the installation will be closed and locked.

For a container image, we recommend using
[community-ansible-dev-tools](https://ansible.readthedocs.io/projects/dev-tools/container/)
[community-ansible-dev-tools](https://docs.ansible.com/projects/dev-tools/container/)
which includes `ansible-dev-tools` (it combines critical Ansible development packages into
a unified Python package). If you have a use case that the `community-ansible-dev-tools`
container doesn't satisfy, please contact the team through the
Expand Down Expand Up @@ -136,7 +136,7 @@ All the arguments are optional and most users should not need them:

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/)
[ansible-lint own configuration file](https://docs.ansible.com/projects/lint/configuring/)
to alter its behavior.

### Installing roles and collections from private repositories
Expand Down
8 changes: 4 additions & 4 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ $ ansible-lint examples/playbooks/play.yml examples/roles/bobbins
```

[collection structure layout]:
https://docs.ansible.com/ansible-core/devel/dev_guide/developing_collections_structure.html#collection-structure
https://docs.ansible.com/projects/ansible-core/devel/dev_guide/developing_collections_structure.html#collection-structure

## Running example playbooks

Expand Down Expand Up @@ -311,18 +311,18 @@ fully understand [variable precedence].
[sarif]:
https://docs.oasis-open.org/sarif/sarif/v2.1.0/csprd01/sarif-v2.1.0-csprd01.html
[variable precedence]:
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#understanding-variable-precedence
https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_variables.html#understanding-variable-precedence

## Dependencies and requirements

Ansible-lint will recognize `requirements.yml` files used for runtime and
testing purposes and install them automatically. Valid locations for these files
are:

- [`requirements.yml`](https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-roles-and-collections-from-the-same-requirements-yml-file)
- [`requirements.yml`](https://docs.ansible.com/projects/ansible/latest/galaxy/user_guide.html#installing-roles-and-collections-from-the-same-requirements-yml-file)
- `roles/requirements.yml`
- `collections/requirements.yml`
- `tests/requirements.yml`
- `tests/integration/requirements.yml`
- `tests/unit/requirements.yml`
- [`galaxy.yml`](https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html)
- [`galaxy.yml`](https://docs.ansible.com/projects/ansible/latest/dev_guide/collections_galaxy_meta.html)
2 changes: 1 addition & 1 deletion examples/ansible-navigator.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
# see https://ansible-navigator.readthedocs.io/en/latest/settings/
# see https://docs.ansible.com/projects/navigator/settings/
ansible-navigator: {}
2 changes: 1 addition & 1 deletion examples/broken/ansible-navigator.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
# https://ansible-navigator.readthedocs.io/en/latest/settings/
# https://docs.ansible.com/projects/navigator/settings/
ansible: {} # invalid as it is missing 'ansible-navigator' parent key
2 changes: 1 addition & 1 deletion examples/inventory/inventory.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html
# https://docs.ansible.com/projects/ansible/latest/inventory_guide/intro_inventory.html
ungrouped: {}
all:
hosts:
Expand Down
2 changes: 1 addition & 1 deletion examples/meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
# https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_structure.html
# https://docs.ansible.com/projects/ansible/latest/dev_guide/developing_collections_structure.html
requires_ansible: ">=2.10,<2.20"
2 changes: 1 addition & 1 deletion examples/roles/dependency_in_meta/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# meta file, determined by ending in meta/main.yml
# https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.html#role-dependencies
# https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_reuse_roles.html#role-dependencies
allow_duplicates: true
dependencies:
# from Bitbucket
Expand Down
2 changes: 1 addition & 1 deletion examples/roles/hello/meta/argument_specs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#role-argument-validation
# https://docs.ansible.com/projects/ansible/latest/user_guide/playbooks_reuse_roles.html#role-argument-validation
argument_specs:
main:
short_description: The main entry point for the role.
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# cspell:ignore superfences
site_name: Ansible Lint Documentation
site_url: https://ansible.readthedocs.io/projects/lint/
site_url: https://docs.ansible.com/projects/lint/
repo_url: https://github.com/ansible/ansible-lint
edit_uri: blob/main/docs/
copyright: Copyright © Red Hat, Inc.
Expand Down Expand Up @@ -157,7 +157,7 @@ plugins:
merge_init_into_class: yes
show_submodules: yes
inventories:
- url: https://docs.ansible.com/ansible/latest/objects.inv
- url: https://docs.ansible.com/projects/ansible/latest/objects.inv
domains: [py, std]

markdown_extensions:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dynamic = ["version"]

[project.urls]
changelog = "https://github.com/ansible/ansible-lint/releases"
documentation = "https://ansible.readthedocs.io/projects/lint/"
documentation = "https://docs.ansible.com/projects/lint/"
homepage = "https://github.com/ansible/ansible-lint"
repository = "https://github.com/ansible/ansible-lint"

Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/_internal/warning.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ runtime warnings found during execution. As stated by its name, they are not
counted as errors, so they do not influence the final outcome.

- `warning[raw-non-string]` indicates that you are using
`[raw](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/raw_module.html#ansible-collections-ansible-builtin-raw-module)`
`[raw](https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/raw_module.html#ansible-collections-ansible-builtin-raw-module)`
module with non-string arguments, which is not supported by Ansible.
2 changes: 1 addition & 1 deletion src/ansiblelint/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def report_outcome(
ignore_file.writelines(sorted(lines))
elif matched_rules and not self.options.quiet:
console_stderr.print(
"Read [link=https://ansible.readthedocs.io/projects/lint/configuring/#ignoring-rules-for-entire-files]documentation[/link] for instructions on how to ignore specific rule violations.",
"Read [link=https://docs.ansible.com/projects/lint/configuring/#ignoring-rules-for-entire-files]documentation[/link] for instructions on how to ignore specific rule violations.",
)

# Do not deprecate the old tags just yet. Why? Because it is not currently feasible
Expand Down
4 changes: 2 additions & 2 deletions src/ansiblelint/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{"ansible-navigator-config": "**/ansible-navigator.{yaml,yml}"},
{"inventory": "**/inventory/**.{yaml,yml}"},
{"requirements": "**/meta/requirements.{yaml,yml}"}, # v1 only
# https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html
# https://docs.ansible.com/projects/ansible/latest/dev_guide/collections_galaxy_meta.html
{"galaxy": "**/galaxy.yml"}, # Galaxy collection meta
{"reno": "**/releasenotes/*/*.{yaml,yml}"}, # reno release notes
{"vars": "**/{host_vars,group_vars,vars,defaults}/**/*.{yaml,yml}"},
Expand Down Expand Up @@ -180,7 +180,7 @@ class Options: # pylint: disable=too-many-instance-attributes
yamllint_file: Path | None = None
max_tasks: int = 100
max_block_depth: int = 20
# Refer to https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
# Refer to https://docs.ansible.com/projects/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
_default_supported = ["2.15.", "2.16.", "2.17.", "2.18.", "2.19."]
supported_ansible_also: list[str] = field(default_factory=list)

Expand Down
4 changes: 2 additions & 2 deletions src/ansiblelint/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
MAX_LENGTH_TAG = 64
DEFAULT_RULESDIR = Path(__file__).parent / "rules"
CUSTOM_RULESDIR_ENVVAR = "ANSIBLE_LINT_CUSTOM_RULESDIR"
RULE_DOC_URL = "https://ansible.readthedocs.io/projects/lint/rules/"
RULE_DOC_URL = "https://docs.ansible.com/projects/lint/rules/"
SKIP_SCHEMA_UPDATE = "ANSIBLE_LINT_SKIP_SCHEMA_UPDATE"

ENV_VARS_HELP = {
Expand Down Expand Up @@ -83,7 +83,7 @@ def main():
"meta-runtime",
"tasks", # includes pre_tasks, post_tasks
"handlers", # very similar to tasks but with some specifics
# https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-roles-and-collections-from-the-same-requirements-yml-file
# https://docs.ansible.com/projects/ansible/latest/galaxy/user_guide.html#installing-roles-and-collections-from-the-same-requirements-yml-file
"requirements",
"role", # that is a folder!
"yaml", # generic yaml file, previously reported as unknown file type
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# - vscode integrated terminal - bold might not be rendered differently, links will not work
#
# When it comes to colors being used, try to match:
# - Ansible official documentation theme, https://docs.ansible.com/ansible/latest/dev_guide/developing_api.html
# - Ansible official documentation theme, https://docs.ansible.com/projects/ansible/latest/dev_guide/developing_api.html
# - VSCode Ansible extension for syntax highlighting
# - GitHub markdown theme
#
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/rules/args.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ value along with conditionals on the options like `mutually_exclusive`,
`required_together`, `required_one_of` and so on.

For more information see the
[argument spec validator](https://docs.ansible.com/ansible/latest/reference_appendices/module_utils.html#argumentspecvalidator)
[argument spec validator](https://docs.ansible.com/projects/ansible/latest/reference_appendices/module_utils.html#argumentspecvalidator)
topic in the Ansible module utility documentation.

Possible messages:
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/rules/avoid_implicit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ undocumented.

This rule will produce the following type of error messages:

- `avoid-implicit[copy-content]` is not a string as [copy](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/copy_module.html#synopsis)
- `avoid-implicit[copy-content]` is not a string as [copy](https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/copy_module.html#synopsis)
modules also accept these, but without documenting them.

## Problematic Code
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/rules/complexity.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ suggesting refactoring for better readability and maintainability.

`complexity[tasks]` will be triggered if the total number of tasks inside a file
is above 100. If encountered, you should consider using
[`ansible.builtin.include_tasks`](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/include_tasks_module.html)
[`ansible.builtin.include_tasks`](https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/include_tasks_module.html)
to split your tasks into smaller files.

## complexity[nesting]
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/rules/deprecated_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This rule identifies deprecated modules in playbooks.
You should avoid using deprecated modules because they are not maintained, which can pose a security risk.
Additionally when a module is deprecated it is available temporarily with a plan for future removal.

Refer to the [Ansible module index](https://docs.ansible.com/ansible/latest/collections/index_module.html) for information about replacements and removal dates for deprecated modules.
Refer to the [Ansible module index](https://docs.ansible.com/projects/ansible/latest/collections/index_module.html) for information about replacements and removal dates for deprecated modules.

## Problematic Code

Expand Down
4 changes: 3 additions & 1 deletion src/ansiblelint/rules/deprecated_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class DeprecatedModuleRule(AnsibleLintRule):
"These are deprecated modules, some modules are kept "
"temporarily for backwards compatibility but usage is discouraged."
)
link = "https://docs.ansible.com/ansible/latest/collections/index_module.html"
link = (
"https://docs.ansible.com/projects/ansible/latest/collections/index_module.html"
)
severity = "HIGH"
tags = ["deprecations"]
version_changed = "4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/rules/fqcn.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The `fqcn` rule has the following checks:

!!! warning

This rule does not take [`collections` keyword](https://docs.ansible.com/ansible/latest/collections_guide/collections_using_playbooks.html#simplifying-module-names-with-the-collections-keyword) into consideration for resolving content.
This rule does not take [`collections` keyword](https://docs.ansible.com/projects/ansible/latest/collections_guide/collections_using_playbooks.html#simplifying-module-names-with-the-collections-keyword) into consideration for resolving content.
The `collections` keyword provided a temporary mechanism transitioning to Ansible 2.9.
You should rewrite any content that uses the `collections:` key and avoid it where possible.

Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/rules/galaxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This rule can produce messages such:
- `galaxy[no-changelog]` - collection is missing a changelog file in expected
locations.
- `galaxy[no-runtime]` - Please add a
[meta/runtime.yml](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_structure.html#meta-directory-and-runtime-yml)
[meta/runtime.yml](https://docs.ansible.com/projects/ansible/latest/dev_guide/developing_collections_structure.html#meta-directory-and-runtime-yml)
file.
- `galaxy[tags]` - `galaxy.yaml` must have one of the required tags:
`application`, `cloud`, `database`, `infrastructure`, `linux`, `monitoring`,
Expand Down
Loading