mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 08:03:05 +02:00
26 lines
439 B
YAML
26 lines
439 B
YAML
- hosts: A,B
|
|
gather_facts: false
|
|
tasks:
|
|
- block:
|
|
- command: echo
|
|
notify:
|
|
- handler1
|
|
- handler2
|
|
|
|
- fail:
|
|
when: inventory_hostname == "B"
|
|
|
|
- meta: flush_handlers
|
|
always:
|
|
- name: always
|
|
debug:
|
|
msg: always
|
|
handlers:
|
|
- name: handler1
|
|
debug:
|
|
msg: handler1
|
|
|
|
- name: handler2
|
|
debug:
|
|
msg: handler2
|