Skip to content

Instantly share code, notes, and snippets.

@askldjd
Created April 27, 2018 01:09
Show Gist options
  • Save askldjd/4321501cafbcc844ca738dda1c4d46f7 to your computer and use it in GitHub Desktop.
Save askldjd/4321501cafbcc844ca738dda1c4d46f7 to your computer and use it in GitHub Desktop.
Debugging ansible

Best way to debug ansible is to dump the entire state out.

This is a play that would do the job

- name: Debug
  hosts: localhost
  connection: local
  tasks:
  - name: Display all variables/facts known for a host
    debug:
      var: hostvars['localhost']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment