Skip to content

Instantly share code, notes, and snippets.

@RalfWenzel
Last active April 7, 2018 19:54
Show Gist options
  • Select an option

  • Save RalfWenzel/3cc965efc24d0a80453e53ec9b539936 to your computer and use it in GitHub Desktop.

Select an option

Save RalfWenzel/3cc965efc24d0a80453e53ec9b539936 to your computer and use it in GitHub Desktop.
Howto debug ansible playbooks

Debugging from command line

Display all host variables for a given host as ansible sees them

ansible myHost -i myInventory -m debug -a "var=hostvars[inventory_hostname]"

Display all facts for a given host as ansible sees them

ansible myHost -i myInventory -m setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment