Skip to content

Instantly share code, notes, and snippets.

@major
Created November 30, 2016 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save major/9583c97e335262228c2a9ede50d86458 to your computer and use it in GitHub Desktop.
Save major/9583c97e335262228c2a9ede50d86458 to your computer and use it in GitHub Desktop.
Ansible output with debug_message_collector callback plugin
$ ansible-playbook -i hosts.yml playbook.yml
PLAY ***************************************************************************
TASK [setup] *******************************************************************
ok: [localhost]
TASK [Debug] *******************************************************************
ok: [localhost] => {
"msg": "One line"
}
TASK [Debug multiline] *********************************************************
ok: [localhost] => {
"msg": "Run this command:\n\n ps aufx\n\nAnd test the output.\n"
}
PLAY RECAP *********************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0
DEBUG MESSAGE RECAP ************************************************************
DEBUG: [Debug] *****************************************************************
One line
DEBUG: [Debug multiline] *******************************************************
Run this command:
ps aufx
And test the output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment