Kapitel 10: Ablauf allgemein
This commit is contained in:
parent
ce14f646e5
commit
8f40ae0047
32
10/playbook_pre_post_tasks_roles_handlers.yml
Normal file
32
10/playbook_pre_post_tasks_roles_handlers.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
gather_facts: False
|
||||
|
||||
pre_tasks:
|
||||
- debug:
|
||||
msg: "Schritt 1"
|
||||
notify: Handler Schritt 1
|
||||
|
||||
roles:
|
||||
- { role: schritt2 }
|
||||
|
||||
tasks:
|
||||
- debug:
|
||||
msg: "Schritt 3"
|
||||
notify: Handler Schritt 3
|
||||
|
||||
post_tasks:
|
||||
- debug:
|
||||
msg: "Schritt 4"
|
||||
notify: Handler Schritt 4
|
||||
|
||||
handlers:
|
||||
- name: Handler Schritt 1
|
||||
debug: msg="Handler Schritt 1"
|
||||
|
||||
- name: Handler Schritt 3
|
||||
debug: msg="Handler Schritt 3"
|
||||
|
||||
- name: Handler Schritt 4
|
||||
debug: msg="Handler Schritt 4"
|
||||
|
35
10/playbook_pre_post_tasks_roles_handlers_really.yml
Normal file
35
10/playbook_pre_post_tasks_roles_handlers_really.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
gather_facts: False
|
||||
|
||||
pre_tasks:
|
||||
- debug:
|
||||
msg: "Schritt 1"
|
||||
changed_when: True
|
||||
notify: Handler Schritt 1
|
||||
|
||||
roles:
|
||||
- { role: schritt2really }
|
||||
|
||||
tasks:
|
||||
- debug:
|
||||
msg: "Schritt 3"
|
||||
changed_when: True
|
||||
notify: Handler Schritt 3
|
||||
|
||||
post_tasks:
|
||||
- debug:
|
||||
msg: "Schritt 4"
|
||||
changed_when: True
|
||||
notify: Handler Schritt 4
|
||||
|
||||
handlers:
|
||||
- name: Handler Schritt 1
|
||||
debug: msg="Handler Schritt 1"
|
||||
|
||||
- name: Handler Schritt 3
|
||||
debug: msg="Handler Schritt 3"
|
||||
|
||||
- name: Handler Schritt 4
|
||||
debug: msg="Handler Schritt 4"
|
||||
|
4
roles/schritt2/handlers/main.yml
Normal file
4
roles/schritt2/handlers/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- name: Handler Schritt 2
|
||||
debug: msg="Handler Schritt 2"
|
||||
|
3
roles/schritt2/tasks/main.yml
Normal file
3
roles/schritt2/tasks/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- debug: msg="Schritt 2"
|
||||
notify: Handler Schritt 2
|
4
roles/schritt2really/handlers/main.yml
Normal file
4
roles/schritt2really/handlers/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- name: Handler Schritt 2
|
||||
debug: msg="Handler Schritt 2"
|
||||
|
4
roles/schritt2really/tasks/main.yml
Normal file
4
roles/schritt2really/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- debug: msg="Schritt 2"
|
||||
changed_when: True
|
||||
notify: Handler Schritt 2
|
Loading…
Reference in a new issue