community.general.statusio_maintenance (8.5.0) — module

Create maintenance windows for your status.io dashboard

Authors: Benjamin Copeland (@bhcopeland) <ben@copeland.me.uk>

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Creates a maintenance window for status.io

Deletes a maintenance window for status.io

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
url:
    default: https://api.status.io
    description:
    - Status.io API URL. A private apiary can be used instead.
    type: str

desc:
    default: Created by Ansible
    description:
    - Message describing the maintenance window
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Desired state of the package.
    type: str

title:
    default: A new maintenance window
    description:
    - A descriptive title for the maintenance window
    type: str

api_id:
    description:
    - Your unique API ID from status.io
    required: true
    type: str

api_key:
    description:
    - Your unique API Key from status.io
    required: true
    type: str

minutes:
    default: 10
    description:
    - The length of time in UTC that the maintenance will run (starting from playbook
      runtime)
    type: int

automation:
    default: false
    description:
    - Automatically start and end the maintenance window
    type: bool

components:
    aliases:
    - component
    description:
    - The given name of your component (server name)
    elements: str
    type: list

containers:
    aliases:
    - container
    description:
    - The given name of your container (data center)
    elements: str
    type: list

start_date:
    description:
    - Date maintenance is expected to start (Month/Day/Year) (UTC)
    - End Date is worked out from start_date + minutes
    type: str

start_time:
    description:
    - Time maintenance is expected to start (Hour:Minutes) (UTC)
    - End Time is worked out from start_time + minutes
    type: str

statuspage:
    description:
    - Your unique StatusPage ID from status.io
    required: true
    type: str

maintenance_id:
    description:
    - The maintenance id number when deleting a maintenance window
    type: str

maintenance_notify_now:
    default: false
    description:
    - Notify subscribers now
    type: bool

maintenance_notify_1_hr:
    default: false
    description:
    - Notify subscribers 1 hour before maintenance start time
    type: bool

maintenance_notify_24_hr:
    default: false
    description:
    - Notify subscribers 24 hours before maintenance start time
    type: bool

maintenance_notify_72_hr:
    default: false
    description:
    - Notify subscribers 72 hours before maintenance start time
    type: bool

all_infrastructure_affected:
    default: false
    description:
    - If it affects all components and containers
    type: bool