mirror of https://github.com/ansible/ansible.git
added some test
parent
4a285808b0
commit
6ab80968cc
@ -0,0 +1,20 @@
|
||||
|
||||
- hosts: testhost,testhost2
|
||||
gather_facts: false
|
||||
any_errors_fatal: true
|
||||
tasks:
|
||||
- block:
|
||||
- debug:
|
||||
msg: Some task running for all hosts
|
||||
- fail:
|
||||
run_once: true
|
||||
- name: any_errors_fatal fails all hosts when any of them fails
|
||||
debug:
|
||||
msg: SHOULD NOT HAPPEN
|
||||
rescue:
|
||||
- name: Rescues both hosts
|
||||
debug:
|
||||
msg: rescuedd
|
||||
- name: You can recover from fatal errors by adding a rescue section to the block.
|
||||
debug:
|
||||
msg: recovered
|
Loading…
Reference in New Issue