mirror of https://github.com/ansible/ansible.git
* updated tests to conform to new block inheritance
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit b1d6750e8b
)
pull/77061/head
parent
6916e152ff
commit
ee112d9984
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- correctly inherit vars from parent in block (https://github.com/ansible/ansible/issues/75286).
|
@ -1,7 +1,7 @@
|
||||
- debug:
|
||||
msg: '{{ test_role_input | default("(undefined)") }}'
|
||||
register: test_role_output
|
||||
register: non_coll_role_to_call_test_role_output
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- test_role_input is not defined or test_role_input == test_role_output.msg
|
||||
- 'non_coll_role_to_call_test_role_output.msg == "include another non-coll role"'
|
||||
|
@ -0,0 +1,2 @@
|
||||
shippable/posix/group4
|
||||
context/controller
|
@ -0,0 +1,16 @@
|
||||
- name: outer
|
||||
vars:
|
||||
myvar: abc
|
||||
block:
|
||||
- assert:
|
||||
that:
|
||||
- "myvar == 'abc'"
|
||||
|
||||
- name: inner block
|
||||
vars:
|
||||
myvar: 123
|
||||
block:
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- myvar|int == 123
|
Loading…
Reference in New Issue