89c8eb5a08
* Split up lookup integration tests. * Rename lookup_paths integration test. This will avoid confusing it for a test of the `paths` lookup plugin, which does not exist. * Fix lookup_pipe integration test. The test now verifies it receives the correct output. Adding a second task also causes code coverage to be properly registered for the lookup plugin. * Rename ini lookup test to match plugin name. * Update sanity ignore path.
16 lines
489 B
YAML
16 lines
489 B
YAML
- name: Test that we can give it a single value and receive a single value
|
|
set_fact:
|
|
var_host: '{{ lookup("vars", "ansible_host") }}'
|
|
|
|
- assert:
|
|
that:
|
|
- 'var_host == ansible_host'
|
|
|
|
- name: Test that we can give a list of values to var and receive a list of values back
|
|
set_fact:
|
|
var_host_info: '{{ query("vars", "ansible_host", "ansible_connection") }}'
|
|
|
|
- assert:
|
|
that:
|
|
- 'var_host_info[0] == ansible_host'
|
|
- 'var_host_info[1] == ansible_connection'
|