Created
September 21, 2016 06:17
-
-
Save sshnaidm/fce5868e8db5b83c17cf12f6a0f1cd9f to your computer and use it in GitHub Desktop.
dump all ansible variables
This file contains hidden or 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
tasks: | |
- name: Dump all vars | |
action: template src=templates/dumpall.j2 dest=/tmp/ansible.all | |
dumpall.j2: | |
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 }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment