community.general.hipchat 模块 – 发送消息到 Hipchat
注意
此模块是 community.general 集合(版本 10.1.0)的一部分。
如果您使用的是 ansible
包,您可能已经安装了这个集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install community.general
。
要在 playbook 中使用它,请指定:community.general.hipchat
。
已弃用
- 在以下版本中移除:
版本 11.0.0
- 原因:
hipchat 服务已停止,自托管变体自 2020 年起已停止使用。
- 替代方案:
没有。
概要
向 Hipchat 房间发送消息,并可以选择控制格式。
参数
参数 |
注释 |
---|---|
如果使用自托管 hipchat 服务器,则使用 API url。对于 Hipchat API 版本 2,请使用默认 URI,其中 默认值: |
|
消息的背景颜色。 选择
|
|
消息正文。 |
|
消息格式。 选择
|
|
消息将显示的发送者名称。最大长度为 15 个字符 - 超过此长度将被截断。 默认值: |
|
如果为 true,将为房间中的用户触发通知。 选择
|
|
房间的 ID 或名称。 |
|
API 令牌。 |
|
如果为 选择
|
属性
属性 |
支持 |
描述 |
---|---|---|
支持: 完全 |
可以在 |
|
支持: 无 |
在差异模式下,将返回已更改(或可能需要在 |
示例
- 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
状态
此模块将在版本 11.0.0 中删除。 [已弃用]
有关更多信息,请参阅 已弃用。