community.general.uptimerobot 模块 – 暂停和启动 Uptime Robot 监控
注意
此模块是 community.general 集合(版本 10.1.0)的一部分。
如果您正在使用 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install community.general。您需要更多要求才能使用此模块,有关详细信息,请参阅 要求。
要在 playbook 中使用它,请指定:community.general.uptimerobot。
概要
- 此模块将允许您启动和暂停 Uptime Robot 监控 
要求
执行此模块的主机需要满足以下要求。
- 有效的 Uptime Robot API 密钥 
参数
| 参数 | 注释 | 
|---|---|
| Uptime Robot API 密钥。 | |
| 要检查的监控器的 ID。 | |
| 定义监控器应运行还是暂停。 选择 
 | 
属性
| 属性 | 支持 | 描述 | 
|---|---|---|
| 支持: 无 | 可以在  | |
| 支持: 无 | 在 diff 模式下,将返回有关已更改内容(或可能需要在  | 
注释
注意
- 尚未实现添加和删除监控器和警报联系人的支持。 
示例
- name: Pause the monitor with an ID of 12345
  community.general.uptimerobot:
    monitorid: 12345
    apikey: 12345-1234512345
    state: paused
- name: Start the monitor with an ID of 12345
  community.general.uptimerobot:
    monitorid: 12345
    apikey: 12345-1234512345
    state: started
