Created
November 7, 2018 14:35
-
-
Save e-minguez/e15ba63879be278358c892807f69a87a to your computer and use it in GitHub Desktop.
Dump variables
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
--- | |
# To be used as: | |
# ansible-playbook --user openshift -i /usr/share/ansible/openshift-ansible/playbooks/openstack/inventory.py -i inventory dump.yml | |
- name: Dump debug info | |
hosts: all | |
become: 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