Add debug_env role for debugging needs down the road.
This commit is contained in:
parent
76eb4b0f04
commit
4e127e63ed
2 changed files with 28 additions and 0 deletions
9
roles/debug_env/tasks/main.yml
Normal file
9
roles/debug_env/tasks/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#
|
||||||
|
# This role can be added to a playbook to dump out all
|
||||||
|
# the env from ansible to see what variables and facts are.
|
||||||
|
# Taken from https://coderwall.com/p/13lh6w
|
||||||
|
#
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Dump all ansible vars
|
||||||
|
action: template src=templates/dumpall.j2 dest=/tmp/ansible.all
|
19
roles/debug_env/templates/dumpall.j2
Normal file
19
roles/debug_env/templates/dumpall.j2
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
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 }}
|
Loading…
Add table
Add a link
Reference in a new issue