File: plugin_errors.yml

package info (click to toggle)
ansible-core 2.19.0~beta6-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 32,628 kB
  • sloc: python: 180,313; cs: 4,929; sh: 4,601; xml: 34; makefile: 21
file content (62 lines) | stat: -rw-r--r-- 1,473 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
- name: attempt to use a filter plugin that fails to load
  raw: echo {{ '' | broken }}
  ignore_errors: yes
  register: error

- assert:
    that:
      - error is failed
      - |
        error.msg is contains("filter plugin 'broken' failed to load: boom")

- name: attempt to use a filter plugin that is not found
  raw: echo {{ '' | nope }}
  ignore_errors: yes
  register: error

- assert:
    that:
      - error is failed
      - error.msg is contains("No filter named 'nope'")

- name: attempt to use a test plugin that fails to load
  raw: echo {{ '' is broken }}
  ignore_errors: yes
  register: error

- assert:
    that:
      - error is failed
      - |
        error.msg is contains("test plugin 'broken' failed to load: boom")

- name: attempt to use a test plugin that is not found
  raw: echo {{ '' is nope }}
  ignore_errors: yes
  register: error

- assert:
    that:
      - error is failed
      - error.msg is contains("No test named 'nope'")

- name: attempt to use a lookup plugin that fails to load
  raw: echo {{ lookup('broken') }}
  ignore_errors: yes
  register: error

- assert:
    that:
      - error is failed
      - |
        error.msg is contains("lookup plugin 'broken' failed to load: boom")

- name: attempt to use a lookup plugin that is not found
  raw: echo {{ lookup('nope') }}
  ignore_errors: yes
  register: error

- assert:
    that:
      - error is failed
      - error.msg is contains("lookup plugin 'nope' was not found")