File: sudo_flags_failure.yml

package info (click to toggle)
python-mitogen 0.3.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,728 kB
  • sloc: python: 24,644; sh: 198; makefile: 74; perl: 19; ansic: 18
file content (27 lines) | stat: -rw-r--r-- 828 bytes parent folder | download | duplicates (2)
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
27
- name: integration/become/sudo_flags_failure.yml
  hosts: test-targets
  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 out.module_stdout is match("sudo: invalid option -- '-'")
            or out.module_stderr is match("sudo: invalid option -- '-'")
            or out.module_stdout is match("sudo: unrecognized option [`']--derps'")
            or out.module_stderr is match("sudo: unrecognized option [`']--derps'")
        fail_msg: |
          out={{ out }}
  tags:
    - sudo
    - sudo_flags_failure