32 lines
657 B
YAML
32 lines
657 B
YAML
|
---
|
||
|
- hosts:
|
||
|
- tn00-ubu2204
|
||
|
- tn00-debian12
|
||
|
- tn00-alpine3i
|
||
|
|
||
|
tasks:
|
||
|
- name: Handler notify
|
||
|
debug:
|
||
|
msg: "Handler wird ggf. benachrichtigt"
|
||
|
changed_when: ansible_os_family == "Debian"
|
||
|
notify: Echo-Handler
|
||
|
|
||
|
- name: Flush handlers
|
||
|
meta: flush_handlers
|
||
|
|
||
|
- name: Ubuntu geht kaputt
|
||
|
debug:
|
||
|
msg: "{{ 'Ubuntu kaputt' if ansible_distribution == 'Ubuntu' else 'Nix kaputt' }}"
|
||
|
failed_when: ansible_distribution == "Ubuntu"
|
||
|
|
||
|
- name: Lebenszeichen
|
||
|
debug:
|
||
|
msg: "Ich lebe noch"
|
||
|
|
||
|
|
||
|
handlers:
|
||
|
- name: Echo-Handler
|
||
|
debug:
|
||
|
msg: "Der Handler wurde aufgerufen!"
|
||
|
|