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:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 06:24:58 +0000
commitba233a0cbad76b4783a03893e7bf4716fbc0f0ec (patch)
treead369728c1edbe3631c8150585659078ae5d7d0b /examples/playbooks/rule-partial-become-without-become-pass.yml
parentReleasing progress-linux version 6.17.2-3~progress7.99u1. (diff)
downloadansible-lint-ba233a0cbad76b4783a03893e7bf4716fbc0f0ec.tar.xz
ansible-lint-ba233a0cbad76b4783a03893e7bf4716fbc0f0ec.zip
Merging upstream version 24.6.1.
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