Debian Codegraph @

test/integration/targets/missing_required_lib/runme.yml

raw
1 - hosts: localhost
2 gather_facts: false
3 tasks:
4 - command: ansible localhost -m import_role -a role=missing_required_lib -e url=true -e reason=true
5 register: missing_required_lib_all
6 failed_when: missing_required_lib_all.rc == 0
7
8 - command: ansible localhost -m import_role -a role=missing_required_lib
9 register: missing_required_lib_none
10 failed_when: missing_required_lib_none.rc == 0
11
12 - command: ansible localhost -m import_role -a role=missing_required_lib -e url=true
13 register: missing_required_lib_url
14 failed_when: missing_required_lib_url.rc == 0
15
16 - command: ansible localhost -m import_role -a role=missing_required_lib -e reason=true
17 register: missing_required_lib_reason
18 failed_when: missing_required_lib_reason.rc == 0
19
20 - assert:
21 that:
22 - missing_required_lib_all.stdout is search(expected_all)
23 - missing_required_lib_none.stdout is search(expected_none)
24 - missing_required_lib_url.stdout is search(expected_url)
25 - missing_required_lib_reason.stdout is search(expected_reason)
26 vars:
27 expected_all: >-
28 Failed to import the required Python library \(ansible_missing_lib\) on
29 \S+'s Python \S+\.
30 This is required for fun\. See https://github.com/ansible/ansible for
31 more info. Please read the module documentation and install it in the
32 appropriate location\. If the required library is installed, but Ansible
33 is using the wrong Python interpreter, please consult the documentation
34 on ansible_python_interpreter
35 expected_none: >-
36 Failed to import the required Python library \(ansible_missing_lib\) on
37 \S+'s Python \S+\.
38 Please read the module documentation and install it in the
39 appropriate location\. If the required library is installed, but Ansible
40 is using the wrong Python interpreter, please consult the documentation
41 on ansible_python_interpreter
42 expected_url: >-
43 Failed to import the required Python library \(ansible_missing_lib\) on
44 \S+'s Python \S+\.
45 See https://github.com/ansible/ansible for
46 more info\. Please read the module documentation and install it in the
47 appropriate location\. If the required library is installed, but Ansible
48 is using the wrong Python interpreter, please consult the documentation
49 on ansible_python_interpreter
50 expected_reason: >-
51 Failed to import the required Python library \(ansible_missing_lib\) on
52 \S+'s Python \S+\.
53 This is required for fun\.
54 Please read the module documentation and install it in the
55 appropriate location\. If the required library is installed, but Ansible
56 is using the wrong Python interpreter, please consult the documentation
57 on ansible_python_interpreter