Skip to content

Instantly share code, notes, and snippets.

@robrant
Created November 7, 2016 13:56
Show Gist options
  • Save robrant/1e4eacc69dae621ec4cad0df97d1284e to your computer and use it in GitHub Desktop.
Save robrant/1e4eacc69dae621ec4cad0df97d1284e to your computer and use it in GitHub Desktop.
Ansible play for debugging a whole load of useful variables. Might be an issue with one of the template filters on 2.2
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 }}
- name: Dump all vars
action: template src=dumpall.j2 dest=/tmp/ansible.all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment