ansible/test/integration/targets/lookup_template/tasks/main.yml
Matt Clay 89c8eb5a08
Split up lookup integration tests. (#67294)
* 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.
2020-02-10 16:41:45 -08:00

19 lines
575 B
YAML

# ref #18526
- name: Test that we have a proper jinja search path in template lookup
set_fact:
hello_world: "{{ lookup('template', 'hello.txt') }}"
- assert:
that:
- "hello_world|trim == 'Hello world!'"
- name: Test that we have a proper jinja search path in template lookup with different variable start and end string
vars:
my_var: world
set_fact:
hello_world_string: "{{ lookup('template', 'hello_string.txt', variable_start_string='[%', variable_end_string='%]') }}"
- assert:
that:
- "hello_world_string|trim == 'Hello world!'"