You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nützlich wenn das Playbook schon ziemlich groß ist, und man vor dem Testrun nur die Syntax controllieren will
29
+
</section>
30
+
<sectiondata-markdown="">
31
+
# Debug Parameter
32
+
33
+
```bash
34
+
ansible-playbook simple.yml -i inventory.ini -vvv
35
+
```
36
+
37
+
Es wird der Output bzw. Return Value jedes Tasks/Module ausgegeben
38
+
39
+
> Mehr **v** in -v setzt den Debug Level höher
40
+
</section>
41
+
<sectiondata-markdown="">
42
+
# Debug in Playbook
43
+
44
+
```YAML
45
+
tasks:
46
+
- apt:
47
+
name: nano
48
+
register: apt_result # Speichert den Return Value vom Module in eine Variable apt_result
49
+
50
+
- debug:
51
+
var: apt_result # Gibt die Variable apt_result aus
52
+
53
+
- debug:
54
+
msg: "This is a Output" # Gibt den Text aus
55
+
56
+
- debug:
57
+
msg: "Das ist der Output von apt_result stdout: {{ apt_result.stdout }}" # Gibt den Variablen Inhalt apt_result.stdout mit dem Text aus (String Combine)
0 commit comments