Skip to content

Commit 6f3c2eb

Browse files
fix: correct partial-become rule documentation comments (#4876)
1 parent 559053d commit 6f3c2eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ansiblelint/rules/partial_become.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This rule can produce the following messages:
1414

1515
!!! warning
1616

17-
While Ansible inherits have of `become` and `become_user` from upper levels,
17+
While Ansible inherits `become` and `become_user` from upper levels,
1818
like play level or command line, we do not look at these values. This rule
1919
requires you to be explicit and always define both in the same place, mainly
2020
in order to prevent accidents when some tasks are moved from one location to
@@ -32,7 +32,7 @@ This rule can produce the following messages:
3232
ansible.builtin.service:
3333
name: httpd
3434
state: started
35-
become_user: apache # <- Does not change the user because "become: true" is not set.
35+
become_user: apache # <- "become: true" should be set here, not at play level.
3636
```
3737
3838
## Correct Code
@@ -88,7 +88,7 @@ This rule can produce the following messages:
8888
ansible.builtin.service:
8989
name: httpd
9090
state: started
91-
become_user: apache # <- Does not change the user because "become: true" is not set.
91+
become_user: apache # <- "become: true" should be set here, not rely on play level.
9292
```
9393
9494
## Correct Code
@@ -118,7 +118,7 @@ This rule can produce the following messages:
118118
name: httpd
119119
state: started
120120
become: true # <- Activates privilege escalation.
121-
become_user: apache # <- Does not change the user because "become: true" is not set.
121+
become_user: apache # <- Changes the user with the desired privileges.
122122
```
123123
124124
!!! note

0 commit comments

Comments
 (0)