summaryrefslogtreecommitdiffstats
path: root/examples/playbooks/rule-partial-become-without-become-pass.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 06:24:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 06:24:57 +0000
commit1faea9a6c75f33109e8f66b57b432fdad57b3f46 (patch)
tree4184ce38ac0cf9d5a46bbbae03c87be82927f12b /examples/playbooks/rule-partial-become-without-become-pass.yml
parentAdding upstream version 6.17.2. (diff)
downloadansible-lint-upstream.tar.xz
ansible-lint-upstream.zip
Adding upstream version 24.6.1.upstream/24.6.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/playbooks/rule-partial-become-without-become-pass.yml')
-rw-r--r--examples/playbooks/rule-partial-become-without-become-pass.yml20
1 files changed, 12 insertions, 8 deletions
diff --git a/examples/playbooks/rule-partial-become-without-become-pass.yml b/examples/playbooks/rule-partial-become-without-become-pass.yml
index e1ae189..c01b141 100644
--- a/examples/playbooks/rule-partial-become-without-become-pass.yml
+++ b/examples/playbooks/rule-partial-become-without-become-pass.yml
@@ -1,14 +1,16 @@
---
-- hosts: localhost
+- name: Test play
+ hosts: localhost
become_user: root
become: true
tasks:
- - ansible.builtin.debug:
+ - name: Debug
+ ansible.builtin.debug:
msg: hello
-- hosts: localhost
-
+- name: Test play
+ hosts: localhost
tasks:
- name: Foo
ansible.builtin.command: whoami
@@ -16,20 +18,22 @@
become: true
changed_when: false
-- hosts: localhost
- become: true
+- name: Test play
+ hosts: localhost
tasks:
- name: Accepts a become from higher scope
ansible.builtin.command: whoami
- become_user: postgres
changed_when: false
-- hosts: localhost
+- name: Test play
+ hosts: localhost
become_user: postgres
+ become: true
tasks:
- name: Accepts a become from a lower scope
ansible.builtin.command: whoami
become: true
+ become_user: root
changed_when: false