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

49 lines
1.4 KiB
YAML

- name: setup state
hosts: localhost
gather_facts: false
tasks:
- file: path={{playbook_dir}}/files state=directory
- file: path={{playbook_dir}}/roles/showfile/files state=directory
- copy: dest={{playbook_dir}}/roles/showfile/files/testfile content='in role files'
- copy: dest={{playbook_dir}}/roles/showfile/testfile content='in role'
- copy: dest={{playbook_dir}}/roles/showfile/tasks/testfile content='in role tasks'
- copy: dest={{playbook_dir}}/files/testfile content='in files'
- copy: dest={{playbook_dir}}/testfile content='in local'
- include: testplay.yml
vars:
remove: nothing
role_out: in role files
play_out: in files
- include: testplay.yml
vars:
remove: roles/showfile/files/testfile
role_out: in role
play_out: in files
- include: testplay.yml
vars:
remove: roles/showfile/testfile
role_out: in role tasks
play_out: in files
- include: testplay.yml
vars:
remove: roles/showfile/tasks/testfile
role_out: in files
play_out: in files
- include: testplay.yml
vars:
remove: files/testfile
role_out: in local
play_out: in local
- name: cleanup
hosts: localhost
gather_facts: false
tasks:
- file: path={{playbook_dir}}/testfile state=absent
- file: path={{playbook_dir}}/files state=absent
- file: path={{playbook_dir}}/roles/showfile/files state=absent