summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/blocks/block_in_rescue.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/blocks/block_in_rescue.yml')
-rw-r--r--test/integration/targets/blocks/block_in_rescue.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/integration/targets/blocks/block_in_rescue.yml b/test/integration/targets/blocks/block_in_rescue.yml
new file mode 100644
index 00000000..15360304
--- /dev/null
+++ b/test/integration/targets/blocks/block_in_rescue.yml
@@ -0,0 +1,33 @@
+- 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"