- name: integration/become/sudo_nonexistent.yml
  hosts: test-targets
  any_errors_fatal: true
  tasks:

    - name: Verify behaviour for non-existent accounts.
      shell: whoami
      become: true
      become_user: slartibartfast
      ignore_errors: true
      register: out

    - name: Verify raw module output.
      assert:
        that: |
          out.failed and (
            ('sudo: unknown user: slartibartfast' in out.msg) or
            ('sudo: unknown user: slartibartfast' in out.module_stderr)
          )
