-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-playbook.yml
More file actions
29 lines (23 loc) · 889 Bytes
/
debug-playbook.yml
File metadata and controls
29 lines (23 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
- name: How to output to the screen with debug
hosts: localhost
connection: local
gather_facts: no
vars:
vendorip: '192.168.22.55'
tasks:
- name: Print out to the screen
debug: # anything within the ansible.builtin collection does not need a FQCN
msg: "Welcome to Ansible"
- name: Print a message variable
debug:
msg: "The vendor IP is: {{ vendorip }}"
# Note that recall within the msg parameter requires mustache-brackets
- name: Print just a variable
debug:
var: vendorip
# Note that recall within var parameter does not require mustache-brackets
- name: Print only with verbosity
ansible.builtin.debug: # This is an example of a Fully Qualified Collection Name (FQCN)
var: vendorip
verbosity: 2 # require -vv at runtime for this task to display