From 2fe34b6444502079dc0b84365ce82dbc92de308e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:06:49 +0200 Subject: Adding upstream version 6.17.2. Signed-off-by: Daniel Baumann --- .../rule-partial-become-without-become-pass.yml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 examples/playbooks/rule-partial-become-without-become-pass.yml (limited to 'examples/playbooks/rule-partial-become-without-become-pass.yml') diff --git a/examples/playbooks/rule-partial-become-without-become-pass.yml b/examples/playbooks/rule-partial-become-without-become-pass.yml new file mode 100644 index 0000000..e1ae189 --- /dev/null +++ b/examples/playbooks/rule-partial-become-without-become-pass.yml @@ -0,0 +1,35 @@ +--- +- hosts: localhost + become_user: root + become: true + + tasks: + - ansible.builtin.debug: + msg: hello + +- hosts: localhost + + tasks: + - name: Foo + ansible.builtin.command: whoami + become_user: postgres + become: true + changed_when: false + +- hosts: localhost + become: true + + tasks: + - name: Accepts a become from higher scope + ansible.builtin.command: whoami + become_user: postgres + changed_when: false + +- hosts: localhost + become_user: postgres + + tasks: + - name: Accepts a become from a lower scope + ansible.builtin.command: whoami + become: true + changed_when: false -- cgit v1.2.3