User Tools

Site Tools


ansible:dump_all_vars

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ansible:dump_all_vars [2019/10/15 10:54]
adyxax created
ansible:dump_all_vars [2020/04/14 12:04] (current)
adyxax
Line 1: Line 1:
-====== Dump all vars ====== +~~REDIRECT>https://newwiki.adyxax.org/blog/​2019/​10/​15/​dump-all-ansible-variables/~~
- +
-Task to use +
-<code> +
-- nameDump all vars +
-  action: template src=dumpall.j2 dest=ansible.all +
-</code> +
- +
-dumpall.j2 template : +
-<​code>​ +
-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 }} +
-</code>+
ansible/dump_all_vars.txt · Last modified: 2020/04/14 12:04 by adyxax