diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/missing_required_lib/runme.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-upstream/2.14.3.tar.xz ansible-core-upstream/2.14.3.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/targets/missing_required_lib/runme.yml')
-rw-r--r-- | test/integration/targets/missing_required_lib/runme.yml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/test/integration/targets/missing_required_lib/runme.yml b/test/integration/targets/missing_required_lib/runme.yml new file mode 100644 index 0000000..e1df795 --- /dev/null +++ b/test/integration/targets/missing_required_lib/runme.yml @@ -0,0 +1,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 |