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.
|
|
|
- name: integration/become/sudo_flags_failure.yml
|
|
|
|
hosts: test-targets
|
|
|
|
any_errors_fatal: true
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: Verify behaviour for bad sudo flags.
|
|
|
|
shell: whoami
|
|
|
|
become: true
|
|
|
|
ignore_errors: true
|
|
|
|
register: out
|
|
|
|
vars:
|
|
|
|
ansible_become_flags: --derps
|
|
|
|
|
|
|
|
- name: Verify raw module output.
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- out.failed
|
|
|
|
- |
|
|
|
|
('sudo: no such option: --derps' in out.msg) or
|
|
|
|
("sudo: invalid option -- '-'" in out.module_stderr) or
|
|
|
|
("sudo: unrecognized option `--derps'" in out.module_stderr) or
|
|
|
|
("sudo: unrecognized option '--derps'" in out.module_stderr)
|