community.general.hipchat module – Send a message to Hipchat

Note

This module is part of the community.general collection (version 7.5.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.hipchat.

Synopsis

  • Send a message to a Hipchat room, with options to control the formatting.

Aliases: notification.hipchat

Parameters

Parameter

Comments

api

string

API url if using a self-hosted hipchat server. For Hipchat API version 2 use the default URI with /v2 instead of /v1.

Default: "https://api.hipchat.com/v1"

color

string

Background color for the message.

Choices:

  • "yellow" ← (default)

  • "red"

  • "green"

  • "purple"

  • "gray"

  • "random"

msg

string / required

The message body.

msg_format

string

Message format.

Choices:

  • "text" ← (default)

  • "html"

msg_from

aliases: from

string

Name the message will appear to be sent from. Max length is 15 characters - above this it will be truncated.

Default: "Ansible"

notify

boolean

If true, a notification will be triggered for users in the room.

Choices:

  • false

  • true ← (default)

room

string / required

ID or name of the room.

token

string / required

API token.

validate_certs

boolean

If false, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.

Choices:

  • false

  • true ← (default)

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Examples

- name: Send a message to a Hipchat room
  community.general.hipchat:
    room: notif
    msg: Ansible task finished

- name: Send a message to a Hipchat room using Hipchat API version 2
  community.general.hipchat:
    api: https://api.hipchat.com/v2/
    token: OAUTH2_TOKEN
    room: notify
    msg: Ansible task finished

Authors

  • Shirou Wakayama (@shirou)

  • Paul Bourdel (@pb8226)