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.
34 lines
800 B
YAML
34 lines
800 B
YAML
4 years ago
|
- hosts: localhost
|
||
|
gather_facts: no
|
||
|
tasks:
|
||
|
- block:
|
||
|
- name: "EXPECTED FAILURE"
|
||
|
fail:
|
||
|
msg: "fail to test single level block in rescue"
|
||
|
rescue:
|
||
|
- block:
|
||
|
- debug:
|
||
|
msg: Rescued!
|
||
|
|
||
|
- block:
|
||
|
- name: "EXPECTED FAILURE"
|
||
|
fail:
|
||
|
msg: "fail to test multi-level block in rescue"
|
||
|
rescue:
|
||
|
- block:
|
||
|
- block:
|
||
|
- debug:
|
||
|
msg: Rescued!
|
||
|
|
||
|
- name: "Outer block"
|
||
|
block:
|
||
|
- name: "Inner block"
|
||
|
block:
|
||
|
- name: "EXPECTED FAILURE"
|
||
|
fail:
|
||
|
msg: "fail to test multi-level block"
|
||
|
rescue:
|
||
|
- name: "Rescue block"
|
||
|
block:
|
||
|
- debug: msg="Inner block rescue"
|