-
Notifications
You must be signed in to change notification settings - Fork 19
maintenance
Note
This module is part of the lucasheld.uptime_kuma collection (version 1.2.0).
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 lucasheld.uptime_kuma
.
To use it in a playbook, specify: lucasheld.uptime_kuma.maintenance
.
- Manages maintenances.
The below requirements are needed on the host that executes this module.
- uptime-kuma-api
Parameter |
Comments |
---|---|
True if the maintenance is active. Choices:
|
|
Headers that are passed to the socketio connection. |
|
The Uptime Kuma password. Only required if no api_token specified and authentication is enabled. |
|
true to verify SSL certificates, or false to skip SSL certificate verification, allowing connections to servers with self signed certificates. Choices:
|
|
How many seconds the client should wait for the connection, an expected event or a server response. Default: 10 |
|
The Uptime Kuma login token. Only required if no api_username and api_password specified and authentication is enabled. |
|
The Uptime Kuma URL. Default: "http://127.0.0.1:3001" |
|
The Uptime Kuma username. Only required if no api_token specified and authentication is enabled. |
|
How many seconds the client should wait for the next event of the same type. There is no way to determine when the last message of a certain type has arrived. Therefore, a timeout is required. If no further message has arrived within this time, it is assumed that it was the last message. Default: 0.2 |
|
The cron schedule of the maintenance. |
|
The date range of the maintenance. |
|
The weekdays of the maintenance. |
|
The description of the maintenance. |
|
The duration (in minutes) of the maintenance. |
|
The id of the maintenance. Only required if no title specified. |
|
The interval day of the maintenance. |
|
The monitors of the maintenance. |
|
The status pages of the maintenance. |
|
The strategy of the maintenance. Choices:
|
|
The time range of the maintenance. |
|
The timezone of the maintenance. |
|
The title of the maintenance. Only required if no id specified. |
|
The weekdays of the maintenance. |
- name: Add a maintenance
lucasheld.uptime_kuma.maintenance:
api_url: http://127.0.0.1:3001
api_username: admin
api_password: secret123
title: maintenance 1
description: test
strategy: single
active: true
intervalDay: 1
dateRange:
- "2022-12-27 22:36:00"
- "2022-12-29 22:36:00"
timeRange:
- hours: 2
minutes: 0
- hours: 3
minutes: 0
timezoneOption: "Europe/Berlin"
monitors:
- name: monitor 1
- name: monitor 2
status_pages:
- name: status page 1
- name: status page 2
state: present
- name: Edit a maintenance
lucasheld.uptime_kuma.maintenance:
api_url: http://127.0.0.1:3001
api_username: admin
api_password: secret123
title: maintenance 1
description: test
strategy: recurring-interval
active: true
intervalDay: 1
dateRange:
- "2022-12-27 22:37:00"
- "2022-12-29 22:37:00"
timeRange:
- hours: 2
minutes: 0
- hours: 3
minutes: 0
monitors:
- id: 1
status_pages:
- id: 1
state: present
- name: Remove a maintenance
lucasheld.uptime_kuma.maintenance:
api_url: http://127.0.0.1:3001
api_username: admin
api_password: secret123
title: maintenance 1
state: absent
- name: Pause a maintenance
lucasheld.uptime_kuma.maintenance:
api_url: http://127.0.0.1:3001
api_username: admin
api_password: secret123
title: maintenance 1
state: paused
- name: Resume a maintenance
lucasheld.uptime_kuma.maintenance:
api_url: http://127.0.0.1:3001
api_username: admin
api_password: secret123
title: maintenance 1
state: resumed
- Lucas Held (@lucasheld)