-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* issue #2663 lint profile docs * remove lint from heading * update with cidrblock suggestion Co-authored-by: Bradley A. Thornton <18386516+cidrblock@users.noreply.github.com> * profile descriptions Co-authored-by: Bradley A. Thornton <18386516+cidrblock@users.noreply.github.com> * chore: auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: Bradley A. Thornton <18386516+cidrblock@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
- Loading branch information
1 parent
f45e364
commit 7dca2fa
Showing
4 changed files
with
63 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ Philosophy<philosophy> | |
installing | ||
usage | ||
configuring | ||
profiles | ||
using-profiles | ||
rules | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
(using-lint-profiles)= | ||
|
||
# Applying profiles | ||
|
||
Ansible-lint profiles allow content creators to progressively improve the quality of Ansible playbooks, roles, and collections. | ||
|
||
During early development cycles, you need Ansible-lint rules to be less strict. | ||
Starting with the minimal profile ensures that Ansible can load your content. | ||
As you move to the next stage of developing content, you can gradually apply profiles to avoid common pitfalls and brittle complexity. | ||
Then, when you are ready to publish or share your content, you can use the `shared` and `production` profiles with much stricter rules. | ||
These profiles harden security, guarantee reliability, and ensure your Ansible content is easy for others to contribute to and use. | ||
|
||
```{note} | ||
Tags such as `opt-in` and `experimental` do not take effect for rules that are included in profiles, directly or indirectly. | ||
If a rule is in a profile, Ansible-lint applies that rule to the content. | ||
``` | ||
|
||
After you install and configure `ansible-lint`, you can apply profiles as follows: | ||
|
||
1. View available profiles with the `-P` flag. | ||
|
||
```bash | ||
ansible-lint -P | ||
``` | ||
|
||
2. Specify a profile with the `--profile` parameter to lint your content with those rules, for example: | ||
|
||
- Enforce standard styles and formatting with the `basic` profile. | ||
|
||
```bash | ||
ansible-lint --profile=basic | ||
``` | ||
|
||
- Ensure automation consistency, reliability, and security with the `safety` profile. | ||
|
||
```bash | ||
ansible-lint --profile=safety | ||
``` | ||
|
||
```{toctree} | ||
:maxdepth: 1 | ||
profiles | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters