blob: e1df7959cbf6b79a58b7c930ba9dc7d65d7c17b1 (
plain)
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
|
- hosts: localhost
gather_facts: false
tasks:
- command: ansible localhost -m import_role -a role=missing_required_lib -e url=true -e reason=true
register: missing_required_lib_all
failed_when: missing_required_lib_all.rc == 0
- command: ansible localhost -m import_role -a role=missing_required_lib
register: missing_required_lib_none
failed_when: missing_required_lib_none.rc == 0
- command: ansible localhost -m import_role -a role=missing_required_lib -e url=true
register: missing_required_lib_url
failed_when: missing_required_lib_url.rc == 0
- command: ansible localhost -m import_role -a role=missing_required_lib -e reason=true
register: missing_required_lib_reason
failed_when: missing_required_lib_reason.rc == 0
- assert:
that:
- missing_required_lib_all.stdout is search(expected_all)
- missing_required_lib_none.stdout is search(expected_none)
- missing_required_lib_url.stdout is search(expected_url)
- missing_required_lib_reason.stdout is search(expected_reason)
vars:
expected_all: >-
Failed to import the required Python library \(ansible_missing_lib\) on
\S+'s Python \S+\.
This is required for fun\. See https://github.com/ansible/ansible for
more info. Please read the module documentation and install it in the
appropriate location\. If the required library is installed, but Ansible
is using the wrong Python interpreter, please consult the documentation
on ansible_python_interpreter
expected_none: >-
Failed to import the required Python library \(ansible_missing_lib\) on
\S+'s Python \S+\.
Please read the module documentation and install it in the
appropriate location\. If the required library is installed, but Ansible
is using the wrong Python interpreter, please consult the documentation
on ansible_python_interpreter
expected_url: >-
Failed to import the required Python library \(ansible_missing_lib\) on
\S+'s Python \S+\.
See https://github.com/ansible/ansible for
more info\. Please read the module documentation and install it in the
appropriate location\. If the required library is installed, but Ansible
is using the wrong Python interpreter, please consult the documentation
on ansible_python_interpreter
expected_reason: >-
Failed to import the required Python library \(ansible_missing_lib\) on
\S+'s Python \S+\.
This is required for fun\.
Please read the module documentation and install it in the
appropriate location\. If the required library is installed, but Ansible
is using the wrong Python interpreter, please consult the documentation
on ansible_python_interpreter
|