mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Moving samples/ out of the root into test/
Since samples/ is used for v2 testing, it fits better into the existing test/ structure.
This commit is contained in:
19
test/samples/test_block.yml
Normal file
19
test/samples/test_block.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
- hosts: all
|
||||
gather_facts: yes
|
||||
tasks:
|
||||
- block:
|
||||
- debug: msg="this is the first task"
|
||||
- fail:
|
||||
when: inventory_hostname == "l2"
|
||||
- debug: msg="only l1 and l3 should see me"
|
||||
rescue:
|
||||
- debug: msg="this is the rescue"
|
||||
- command: /bin/false
|
||||
- debug: msg="no host should see this run"
|
||||
always:
|
||||
- debug: msg="this is the always block, it will always be seen"
|
||||
when: foo|default('') != "some value"
|
||||
tags:
|
||||
- foo
|
||||
- bar
|
||||
- debug: msg="you should only see l1 and l3 run this"
|
||||
Reference in New Issue
Block a user