mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
Add debug_env role for debugging needs down the road.
This commit is contained in:
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 }}
|
||||
Reference in New Issue
Block a user