community.general.statusio_maintenance 模块 – 为您的 status.io 仪表板创建维护窗口
注意
此模块是 community.general 集合(版本 10.1.0)的一部分。
如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install community.general。
要在 playbook 中使用它,请指定:community.general.statusio_maintenance。
概要
- 为 status.io 创建维护窗口 
- 删除 status.io 的维护窗口 
参数
| 参数 | 注释 | 
|---|---|
| 是否影响所有组件和容器 选择 
 | |
| 您的 status.io 的唯一 API ID | |
| 您的 status.io 的唯一 API 密钥 | |
| 自动启动和结束维护窗口 选择 
 | |
| 您的组件的给定名称(服务器名称) | |
| 您的容器的给定名称(数据中心) | |
| 描述维护窗口的消息 默认值:  | |
| 删除维护窗口时的维护 ID 号 | |
| 在维护开始时间前 1 小时通知订阅者 选择 
 | |
| 在维护开始时间前 24 小时通知订阅者 选择 
 | |
| 在维护开始时间前 72 小时通知订阅者 选择 
 | |
| 立即通知订阅者 选择 
 | |
| 维护将运行的 UTC 时间长度(从 playbook 运行时开始) 默认值:  | |
| 维护预计开始的日期(月/日/年)(UTC) 结束日期从 start_date + 分钟数计算得出 | |
| 维护预计开始的时间(小时:分钟)(UTC) 结束时间从 start_time + 分钟数计算得出 | |
| 软件包的期望状态。 选择 
 | |
| 您的 status.io 的唯一 StatusPage ID | |
| 维护窗口的描述性标题 默认值:  | |
| Status.io API URL。可以使用私有 apiary 代替。 默认值:  | 
属性
| 属性 | 支持 | 描述 | 
|---|---|---|
| 支持: 完整 | 可以在  | |
| 支持: 无 | 当处于 diff 模式时,将返回有关已更改内容(或可能需要在  | 
备注
注意
- 您可以使用 apiary API url (http://docs.statusio.apiary.io/) 来捕获 API 流量 
- 使用 start_date 和 start_time 以及分钟数来设置未来的维护窗口 
示例
- name: Create a maintenance window for 10 minutes on server1, with automation to stop the maintenance
  community.general.statusio_maintenance:
    title: Router Upgrade from ansible
    desc: Performing a Router Upgrade
    components: server1.example.com
    api_id: api_id
    api_key: api_key
    statuspage: statuspage_id
    maintenance_notify_1_hr: true
    automation: true
- name: Create a maintenance window for 60 minutes on server1 and server2
  community.general.statusio_maintenance:
    title: Routine maintenance
    desc: Some security updates
    components:
      - server1.example.com
      - server2.example.com
    minutes: 60
    api_id: api_id
    api_key: api_key
    statuspage: statuspage_id
    maintenance_notify_1_hr: true
    automation: true
  delegate_to: localhost
- name: Create a future maintenance window for 24 hours to all hosts inside the Primary Data Center
  community.general.statusio_maintenance:
    title: Data center downtime
    desc: Performing a Upgrade to our data center
    components: Primary Data Center
    api_id: api_id
    api_key: api_key
    statuspage: statuspage_id
    start_date: 01/01/2016
    start_time: 12:00
    minutes: 1440
- name: Delete a maintenance window
  community.general.statusio_maintenance:
    title: Remove a maintenance window
    maintenance_id: 561f90faf74bc94a4700087b
    statuspage: statuspage_id
    api_id: api_id
    api_key: api_key
    state: absent
