ansible/test/integration/targets/collections/test_collection_meta.yml
Matt Davis f7dfa817ae
collection routing (#67684)
* `meta/` directory in collections
* runtime metadata for redirection/deprecation/removal of plugin loads
* a compatibility layer to keep existing content working on ansible-base + collections
* a Python import redirection layer to keep collections-hosted (and otherwise moved) content importable by things that don't know better
* supported Ansible version validation on collection loads
2020-05-26 09:42:06 -07:00

46 lines
1.4 KiB
YAML

- hosts: localhost
gather_facts: no
collections:
- testns.testcoll
vars:
# redirect connection
ansible_connection: testns.testcoll.redirected_local
tasks:
- assert:
that: ('data' | testns.testcoll.testfilter) == 'data_via_testfilter_from_userdir'
# redirect module (multiple levels)
- multilevel1:
# redirect action
- uses_redirected_action:
# redirect import (consumed via action)
- uses_redirected_import:
# redirect lookup
- assert:
that: lookup('formerly_core_lookup') == 'mylookup_from_user_dir'
# redirect filter
- assert:
that: ('yes' | formerly_core_filter) == True
# legacy filter should mask redirected
- assert:
that: ('' | formerly_core_masked_filter) == 'hello from overridden formerly_core_masked_filter'
# redirect test
- assert:
that:
- "'stuff' is formerly_core_test('tuf')"
- "'hello override' is formerly_core_masked_test"
# redirect module (formerly internal)
- formerly_core_ping:
# redirect module from collection (with subdir)
- testns.testcoll.module_subdir.subdir_ping_module:
# redirect module_utils plugin (consumed via module)
- uses_core_redirected_mu:
# deprecated module (issues warning)
- deprecated_ping:
# redirect module (internal alias)
- aliased_ping:
# redirect module (cycle detection, fatal)
# - looped_ping:
# removed module (fatal)
# - dead_ping: