2025-03/10/block_09_Fehler_Block_und_Always.yml
2025-03-27 14:20:05 +01:00

20 lines
424 B
YAML

---
- hosts: localhost
tasks:
- block:
- debug: msg='Block 1'
- command: /bin/false
- debug: msg='Block 2'
rescue:
- debug: msg='Rescue 1'
- command: /bin/false
- debug: msg='Rescue 2'
always:
- debug: msg='Always 1'
- command: /bin/false
- debug: msg='Always 2'
when: ansible_os_family == 'Debian'
- debug: 'msg="Nach dem Block"'