mirror of https://github.com/ansible/ansible.git
compile role with all parents in the dep chain (#79079)
fix inheriting from parents when role depth exceeds 3 Fixes #47023pull/79122/head
parent
cc2e7501db
commit
f9cb679675
@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- include_role - Inherit from role parents beyond a depth of 3 (https://github.com/ansible/ansible/issues/47023).
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
gather_facts: no
|
||||||
|
tasks:
|
||||||
|
- include_role: name=47023_role1
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: static import inside dynamic include inherits defaults/vars
|
||||||
|
include_role:
|
||||||
|
name: include_import_dep_chain
|
@ -0,0 +1 @@
|
|||||||
|
my_default: defined
|
@ -0,0 +1 @@
|
|||||||
|
- include_role: name=47023_role2
|
@ -0,0 +1 @@
|
|||||||
|
my_var: defined
|
@ -0,0 +1 @@
|
|||||||
|
- include_role: name=47023_role3
|
@ -0,0 +1 @@
|
|||||||
|
- include_role: name=47023_role4
|
@ -0,0 +1,5 @@
|
|||||||
|
- debug:
|
||||||
|
msg: "Var is {{ my_var | default('undefined') }}"
|
||||||
|
|
||||||
|
- debug:
|
||||||
|
msg: "Default is {{ my_default | default('undefined') }}"
|
@ -0,0 +1,4 @@
|
|||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- inherit_var is defined
|
||||||
|
- inherit_default is defined
|
@ -0,0 +1 @@
|
|||||||
|
inherit_default: default
|
@ -0,0 +1,2 @@
|
|||||||
|
- import_role:
|
||||||
|
name: imported_from_include
|
@ -0,0 +1 @@
|
|||||||
|
inherit_var: var
|
Loading…
Reference in New Issue