FAQ
Hello,

I'd like to send a summary of the run (basically the play recap which is
shown after playbook execution on the command line) to a hipchat room.

PLAY RECAP
********************************************************************
host1 : ok=8 changed=0 unreachable=0 failed=0
host2 : ok=8 changed=0 unreachable=0 failed=0
host3 : ok=8 changed=0 unreachable=0 failed=0



Is there a way how I could programmatically access the current status?


Thanks,

Daniel

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c6bdbeb1-8371-4643-9c05-84b8c26e3b40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Michael DeHaan at Jul 24, 2014 at 11:07 am
    The answer to accessing events programmatically is a callback plugin, and
    Matt Martz from Rackspace contributed one exactly for hipchat.

    https://github.com/ansible/ansible/blob/devel/plugins/callbacks/hipchat.py

    See the docs about callback plugins, but basically you just need to have
    this stored at a filesystem location and configure ansible.cfg to include
    the callback plugin directory that it is in, and it will load everything in
    that dir.

    You may wish to modify the output it creates.

    This is a way better way to share things in chat than the individual
    notification modules for things like this, as callbacks have an opportunity
    to see *everything* and it's also going to be more efficient as they can
    limit the number of connections/disconnections involved in the chat server.



    On Thu, Jul 24, 2014 at 5:35 AM, Daniel Schroeder wrote:

    Hello,

    I'd like to send a summary of the run (basically the play recap which is
    shown after playbook execution on the command line) to a hipchat room.

    PLAY RECAP
    ********************************************************************
    host1 : ok=8 changed=0 unreachable=0 failed=0
    host2 : ok=8 changed=0 unreachable=0 failed=0
    host3 : ok=8 changed=0 unreachable=0 failed=0



    Is there a way how I could programmatically access the current status?


    Thanks,

    Daniel

    --
    You received this message because you are subscribed to the Google Groups
    "Ansible Project" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/ansible-project/c6bdbeb1-8371-4643-9c05-84b8c26e3b40%40googlegroups.com
    <https://groups.google.com/d/msgid/ansible-project/c6bdbeb1-8371-4643-9c05-84b8c26e3b40%40googlegroups.com?utm_medium=email&utm_source=footer>
    .
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Ansible Project" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgy5C080_04YeKoJuUJKZMShrFdWJ3SaVPQ7jWU%3Dv%2BGUwA%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Daniel Schroeder at Jul 25, 2014 at 8:41 am
    Thanks Michael,

    I already worked with plugins but have totally overlooked the callback
    plugins. This rises followup question on my end but I will start a separate
    topic on that.

    Thanks,
    Daniel

    Am Donnerstag, 24. Juli 2014 13:07:48 UTC+2 schrieb Michael DeHaan:
    The answer to accessing events programmatically is a callback plugin, and
    Matt Martz from Rackspace contributed one exactly for hipchat.

    https://github.com/ansible/ansible/blob/devel/plugins/callbacks/hipchat.py

    See the docs about callback plugins, but basically you just need to have
    this stored at a filesystem location and configure ansible.cfg to include
    the callback plugin directory that it is in, and it will load everything in
    that dir.

    You may wish to modify the output it creates.

    This is a way better way to share things in chat than the individual
    notification modules for things like this, as callbacks have an opportunity
    to see *everything* and it's also going to be more efficient as they can
    limit the number of connections/disconnections involved in the chat server.




    On Thu, Jul 24, 2014 at 5:35 AM, Daniel Schroeder <deem...@googlemail.com
    <javascript:>> wrote:
    Hello,

    I'd like to send a summary of the run (basically the play recap which is
    shown after playbook execution on the command line) to a hipchat room.

    PLAY RECAP
    ********************************************************************
    host1 : ok=8 changed=0 unreachable=0 failed=0
    host2 : ok=8 changed=0 unreachable=0 failed=0
    host3 : ok=8 changed=0 unreachable=0 failed=0



    Is there a way how I could programmatically access the current status?


    Thanks,

    Daniel

    --
    You received this message because you are subscribed to the Google Groups
    "Ansible Project" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to ansible-proje...@googlegroups.com <javascript:>.
    To post to this group, send email to ansible...@googlegroups.com
    <javascript:>.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/ansible-project/c6bdbeb1-8371-4643-9c05-84b8c26e3b40%40googlegroups.com
    <https://groups.google.com/d/msgid/ansible-project/c6bdbeb1-8371-4643-9c05-84b8c26e3b40%40googlegroups.com?utm_medium=email&utm_source=footer>
    .
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Ansible Project" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/726a2d6b-8e38-48ba-9457-25148ea17389%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupansible-project @
postedJul 24, '14 at 10:58a
activeJul 25, '14 at 8:41a
posts3
users2

People

Translate

site design / logo © 2022 Grokbase