summaryrefslogtreecommitdiffstats
path: root/test/become-user-without-become-failure.yml
blob: a4051f028e237397da17d4f2f378f0e51f474564 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- hosts: localhost
  name: become_user without become play
  become_user: root

  tasks:
  - debug:
      msg: hello

- hosts: localhost

  tasks:
  - name: become_user without become task
    command: whoami
    become_user: postgres

- hosts: localhost

  tasks:
  - name: a block with become and become_user on different tasks
    block:
    - name: become
      become: true
      command: whoami
    - name: become_user
      become_user: postgres
      command: whoami