mirror of https://github.com/ansible/ansible.git
Collection role relative deps (#61517)
* default collection support * playbooks run from inside a registered collection will set that collection as the first item in the search order (as will all non-collection roles) * this allows easy migration of runme.sh style playbook/role integration tests to collections without the playbooks/roles needing to know the name of their enclosing collection * disable default collection test under Windows * enable collection search for role dependencies * unqualified role deps in collection-hosted roles will first search the containing collection * if the calling role has specified a collections search list in metadata, it will be appended to the search order for unqualified role deps * disable cycle detection unit test * failing on 3.7+, needs proper cycle detection * see #61527pull/61530/head
parent
7bb0556334
commit
d81ae27a4a
@ -0,0 +1,4 @@
|
||||
minor_changes:
|
||||
- collection role dependencies will first search for unqualified role names in the containing collection.
|
||||
- roles that define a collections search list in metadata will attempt to use the defined search list
|
||||
when resolving unqualified role names.
|
||||
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- testrole # since testrole lives in this collection, we'll check there first
|
||||
@ -0,0 +1,7 @@
|
||||
- debug:
|
||||
msg: '{{ outer_role_input | default("(undefined)") }}'
|
||||
register: outer_role_output
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- outer_role_input is not defined or outer_role_input == outer_role_output.msg
|
||||
Loading…
Reference in New Issue