File: issue_332_ansiblemoduleerror_first_occurrence.yml

package info (click to toggle)
python-mitogen 0.3.26-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,456 kB
  • sloc: python: 22,134; sh: 183; makefile: 74; perl: 19; ansic: 18
file content (22 lines) | stat: -rw-r--r-- 592 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
# issue #332: Ansible 2.6 file.py started defining an excepthook and private
# AnsibleModuleError. Ensure file fails correctly.

- name: regression/issue_332_ansiblemoduleerror_first_occurrence.yml
  hosts: test-targets
  tasks:
  - name: Attempt to modify /usr/bin/does-not-exist
    file:
      path: /usr/bin/does-not-exist
      mode: a-s
      state: file
      follow: true
    ignore_errors: true
    register: out

  - assert:
      that:
        - out.msg == 'file (/usr/bin/does-not-exist) is absent, cannot continue'
      fail_msg: |
        out={{ out }}
  tags:
    - issue_332