mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
439 B
YAML
26 lines
439 B
YAML
7 months ago
|
- 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
|