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.
ansible/test/integration/targets/blocks/78612.yml

17 lines
369 B
YAML

- hosts: all
gather_facts: false
tasks:
- block:
- fail:
when: inventory_hostname == 'host1'
rescue:
- block:
- fail:
when: inventory_hostname == 'host1'
- assert:
that:
- "'host1' not in ansible_play_hosts"
- "'host1' not in ansible_play_batch"
success_msg: PASSED