Created
June 20, 2018 20:24
-
-
Save Mudpuppy12/a495323d5e77141bf42d64abd276474e to your computer and use it in GitHub Desktop.
ansible debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
gather_facts: yes | |
tasks: | |
- name: Print some debug information | |
vars: | |
msg: | | |
Module Variables ("vars"): | |
-------------------------------- | |
{{ vars | to_nice_json }} | |
Environment Variables ("environment"): | |
-------------------------------- | |
{{ environment | to_nice_json }} | |
GROUP NAMES Variables ("group_names"): | |
-------------------------------- | |
{{ group_names | to_nice_json }} | |
GROUPS Variables ("groups"): | |
-------------------------------- | |
{{ groups | to_nice_json }} | |
HOST Variables ("hostvars"): | |
-------------------------------- | |
{{ hostvars | to_nice_json }} | |
debug: | |
msg: "{{ msg.split('\n') }}" | |
tags: debug_info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment