mirror of https://github.com/ansible/ansible.git
Fixes #79968
(cherry picked from commit bd329dc543
)
pull/80019/head
parent
a082726ef2
commit
02d9336b32
@ -0,0 +1,2 @@
|
||||
minor_changes:
|
||||
- Make using blocks as handlers a parser error (https://github.com/ansible/ansible/issues/79968)
|
@ -0,0 +1,7 @@
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- debug:
|
||||
handlers:
|
||||
- name: handler
|
||||
import_tasks: test_block_as_handler-include_import-handlers.yml
|
@ -0,0 +1,8 @@
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- command: echo
|
||||
notify: handler
|
||||
handlers:
|
||||
- name: handler
|
||||
include_tasks: test_block_as_handler-include_import-handlers.yml
|
@ -0,0 +1,8 @@
|
||||
- name: handler
|
||||
block:
|
||||
- name: due to how handlers are implemented, this is correct as it is equivalent to an implicit block
|
||||
debug:
|
||||
- name: this is a parser error, blocks as handlers are not supported
|
||||
block:
|
||||
- name: handler in a nested block
|
||||
debug:
|
@ -0,0 +1,13 @@
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- debug:
|
||||
handlers:
|
||||
- name: handler
|
||||
block:
|
||||
- name: due to how handlers are implemented, this is correct as it is equivalent to an implicit block
|
||||
debug:
|
||||
- name: this is a parser error, blocks as handlers are not supported
|
||||
block:
|
||||
- name: handler in a nested block
|
||||
debug:
|
Loading…
Reference in New Issue