Integration tests for notify with variable list (#66423)
Co-authored-by: Luca Berruti <nadirio@gmail.com> Co-authored-by: lberruti <nadirio@gmail.com>
This commit is contained in:
parent
88efb24ff8
commit
3f5aed056b
3 changed files with 35 additions and 0 deletions
|
@ -13,3 +13,9 @@
|
|||
set_fact:
|
||||
role_templated_listener: True
|
||||
listen: "{{ handler4 }}"
|
||||
- name: name5
|
||||
set_fact:
|
||||
role_handler5: True
|
||||
- set_fact:
|
||||
role_handler6: True
|
||||
listen: name6
|
||||
|
|
|
@ -14,3 +14,13 @@
|
|||
- role_templated_name is defined
|
||||
- role_non_templated_listener is defined
|
||||
- role_templated_listener is undefined
|
||||
|
||||
- command: echo
|
||||
notify: "{{ handler_list }}"
|
||||
|
||||
- meta: flush_handlers
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- role_handler5 is defined
|
||||
- role_handler6 is defined
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
handler2: name2
|
||||
handler3: name3
|
||||
handler4: name4
|
||||
handler_list:
|
||||
- name5
|
||||
- name6
|
||||
|
||||
handlers:
|
||||
- name: name1
|
||||
|
@ -22,6 +25,12 @@
|
|||
set_fact:
|
||||
templated_listener: True
|
||||
listen: "{{ handler4 }}"
|
||||
- name: name5
|
||||
set_fact:
|
||||
handler5: True
|
||||
- set_fact:
|
||||
handler6: True
|
||||
listen: name6
|
||||
|
||||
tasks:
|
||||
- command: echo Hello World
|
||||
|
@ -40,4 +49,14 @@
|
|||
- non_templated_listener is defined
|
||||
- templated_listener is undefined
|
||||
|
||||
- command: echo
|
||||
notify: "{{ handler_list }}"
|
||||
|
||||
- meta: flush_handlers
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- handler5 is defined
|
||||
- handler6 is defined
|
||||
|
||||
- include_role: name=test_templating_in_handlers
|
||||
|
|
Loading…
Reference in a new issue