Ver código fonte

Added dumpvars role to write Ansible facts to /tmp for debugging

merge-requests/1/merge
Christoph Haas 10 anos atrás
pai
commit
da4b8c2663
3 arquivos alterados com 27 adições e 0 exclusões
  1. +1
    -0
      ispmail.yml
  2. +3
    -0
      roles/dumpvars/tasks/main.yml
  3. +23
    -0
      roles/dumpvars/templates/dumpall.j2

+ 1
- 0
ispmail.yml Ver arquivo

@@ -3,4 +3,5 @@
- hosts: all
roles:
- ispmail-packages
- dumpvars


+ 3
- 0
roles/dumpvars/tasks/main.yml Ver arquivo

@@ -0,0 +1,3 @@
---
- name: Dump all vars
action: template src=dumpall.j2 dest=/tmp/ansible-vars

+ 23
- 0
roles/dumpvars/templates/dumpall.j2 Ver arquivo

@@ -0,0 +1,23 @@
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 }}

HOST Variables for this host ({{inventory_hostname}}):
---------------------------------------
{{ hostvars[inventory_hostname] | to_nice_json }}

Carregando…
Cancelar
Salvar