Difference between revisions of "Debug:"
Jump to navigation
Jump to search
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
+ | * https://docs.ansible.com/ansible/latest/collections/ansible/builtin/debug_module.html | ||
https://serverfault.com/questions/695786/ansible-print-debug-msg-variable | https://serverfault.com/questions/695786/ansible-print-debug-msg-variable | ||
Line 7: | Line 8: | ||
debug: | debug: | ||
msg: "Ansible Version: {{ ansibleVersion.stdout }}" | msg: "Ansible Version: {{ ansibleVersion.stdout }}" | ||
+ | </nowiki> | ||
+ | </pre> | ||
+ | |||
+ | https://serverfault.com/questions/537060/how-to-see-stdout-of-ansible-commands | ||
+ | <pre> | ||
+ | <nowiki> | ||
+ | - debug: msg="{{ your_var.stdout }}" | ||
+ | - debug: msg="{{ your_var.stderr }}" | ||
</nowiki> | </nowiki> | ||
</pre> | </pre> | ||
== Related == | == Related == | ||
− | + | * <code>[[ANSIBLE_DEBUG]]</code> | |
− | * [[We were unable to read either as JSON nor YAML]] | + | * <code>[[We were unable to read either as JSON nor YAML]]</code> |
− | * [[.stdout]] | + | * <code>[[.stdout]]</code> |
+ | * [[Ansible print and debug examples]] | ||
+ | * <code>[[msg:]]</code> | ||
+ | * <code>[[-vvv]]</code> | ||
== See also == | == See also == | ||
+ | * {{ansible-playbook}} | ||
* {{Ansible}} | * {{Ansible}} | ||
+ | |||
+ | [[Category:Ansible]] |
Latest revision as of 12:36, 31 August 2022
https://serverfault.com/questions/695786/ansible-print-debug-msg-variable
- name: Print version debug: msg: "Ansible Version: {{ ansibleVersion.stdout }}"
https://serverfault.com/questions/537060/how-to-see-stdout-of-ansible-commands
- debug: msg="{{ your_var.stdout }}" - debug: msg="{{ your_var.stderr }}"
Related[edit]
ANSIBLE_DEBUG
We were unable to read either as JSON nor YAML
.stdout
- Ansible print and debug examples
msg:
-vvv
See also[edit]
ansible-playbook
,ansible-playbook --check
,--tags, -i, --vvv
- Ansible: modules, plugins, Playbooks (examples)
ansible-playbook
,ansible-vault
,ansible-inventory
,ansible-config
, Ansible Tower, Ansible Galaxy (Roles) (ansible-galaxy
),ansible-cmdb
,gather facts
,ansible.cfg
,Ansible Molecule
, Ansible collections,register
,template
,--ask-pass
,--ask-become-pass
,remote_user:
,/etc/ansible/hosts
,ansible-doc
,ansible-lint
,.ansible/
,--forks
,--start-at-task
,changelog
,inventory
,Notify:
,ansible HOSTNAME -m ping
,gathering
,/usr/bin/ansible
,ansible -m ping
,ansible.builtin
,hosts: (Ansible)
,set fact:
,when:
,blockinfile:
,become method:
,include:
,git:
, AWX,ansible --help
, Tags, Ansible variables, versions
Advertising: