ansible/test/integration/targets/path_lookups/testplay.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

20 lines
556 B
YAML

- name: test initial state
hosts: localhost
gather_facts: false
pre_tasks:
- name: remove {{ remove }}
file: path={{ playbook_dir }}/{{ remove }} state=absent
roles:
- showfile
post_tasks:
- name: from play
set_fact: play_result="{{lookup('file', 'testfile')}}"
- name: output stage {{ remove }} removed
debug: msg="play> {{play_out}}, role> {{role_out}}"
- name: verify that result match expected
assert:
that:
- 'play_result == play_out'
- 'role_result == role_out'