Giter Club home page Giter Club logo

ansible-role-dumpall's Introduction

Dumpall role for Ansible

NOT MAINTENED: This module is not maintened anymore. Feel free to fork. If you are looking for a replacement, have a look to this role: ansible-role-debug-dumpallvars

Ansible Galaxy Role

Dump all remote variables and (optionally) copy the result to a destination on the host. It is really helpful to have a dump of all variables (because the official documentation lacks of clarity on this point) and it helps a lot to debug your roles/playbooks. This role is Ansible 2.0 compatible.

Based on the excellent work by Lester Wade, and the very nice implementation of f500. This version basically fixes some minor bugs, and avoid file name collision.

Requirements

Ansible 1.4 and higher. This is compatible with Ansible 2.0.

Installation

Via Ansible Galaxy:

ansible-galaxy install mrjk/ansible-role-dumpall

Role Variables

dumpall_keep_on_guest: no
dumpall_keep_on_host: yes

dumpall_guest_destination: "/tmp/ansible/dump/{{ inventory_hostname }}"
dumpall_host_destination: "/tmp/ansible/dump/{{ inventory_hostname }}"

The dumpall_keep_on_guest and dumpall_keep_on_host variables let you choose where you want to keep the dump file. The default setting is to keep files only on Ansible host.

The dumpall_guest_destination variable is where the dump file is created on the target. The dumpall_host_destination` is where all dumps are retrieved from target.

All variables are mandatory ( except for dumpall_host_destination ), and they are documented in default/main.yml.

Example Playbook

Example without a host_destination will result in a dumpfile /tmp/ansible.all on the guest:

- hosts: servers
  roles:
     - dumpall

Example with a host_destination will result in a dumpfile /examine/ansible.all on the host machine: (the dumpfile on the guest is removed)

- hosts: servers
  roles:
    - role: dumpall
	  dumpall_keep_on_guest: yes
      dumpall_host_destination: /tmp/my_prj

License

LGPL

Author Information

mrjk, jeznet.org

Jasper N. Brouwer, [email protected]

Ramon de la Fuente, [email protected]

ansible-role-dumpall's People

Contributors

ahelal avatar geerlingguy avatar mrjk avatar ramondelafuente avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansible-role-dumpall's Issues

What's up with the fork? (just asking)

Hey mrjk,

I see you've forked the dumpall role; any reason not to just do a PR? No need to have two packages that do exactly the same... (I'd even remove ours if you're going to maintain yours)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.