You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
525 B
YAML
20 lines
525 B
YAML
- 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)
|
|
)
|