2018-04-18 14:43:54 +00:00
|
|
|
- name: integration/become/sudo_nonexistent.yml
|
|
|
|
hosts: all
|
2018-04-09 14:04:40 +00:00
|
|
|
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)
|
|
|
|
)
|