Skip to content

Commit 0574427

Browse files
committed
docs(roles/uptimerobot, plugins/modules/uptimerobot_*): drop references to the standalone utr CLI and use neutral sample data
The standalone uptimerobot-cli (`utr`) repo is going away, so cross- referencing it in our README / CHANGELOG / module docs would dangle. The role README's "Migrating from the utr CLI" section is replaced by a "Read-Only Inspection" section that documents the four `*_info` modules on their own merit; the prefix-collapse rule for monitor friendly_names moves into the `prefix:` subkey docs where it belongs. Top-level README, CHANGELOG and per-module DOCUMENTATION / EXAMPLES blocks lose the "Equivalent of `utr get …`" lines and similar comparisons. Customer-specific sample data (prefix `038`, URLs ending in `-p-mon…`, `e-peds.ch`, `e-medicus.ch`) is replaced by neutral examples (prefix `001`, `app.example.com`).
1 parent 20feb4a commit 0574427

11 files changed

Lines changed: 29 additions & 45 deletions

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
### Added
1818

1919
* **playbooks/setup_basic**: Add `setup_basic__skip_policycoreutils` to skip the `policycoreutils` role, matching the pattern used by the other roles in the playbook.
20-
* **role:uptimerobot, plugins/modules/uptimerobot_***: New role and a set of nine custom modules to manage UptimeRobot resources directly from a playbook. CRUD modules: `uptimerobot_monitor`, `uptimerobot_mwindow`, `uptimerobot_psp`, plus `uptimerobot_alert_contact` (delete only — UptimeRobot API v2 does not expose creating contacts). Read-only info modules for inspection and dynamic inventories: `uptimerobot_account_info`, `uptimerobot_monitor_info`, `uptimerobot_mwindow_info`, `uptimerobot_alert_contact_info`, `uptimerobot_psp_info` — together replacing all `utr get …` subcommands. All CRUD modules support `--check` and `--diff`, are idempotent on re-run, and translate API integer IDs to user-facing labels in both directions. The role accepts the same YAML structure as the existing `utr` CLI's `utr.yml` / `mwindows.yml` / `psps.yml` / `alertcontacts.yml`, so existing inventories migrate by copying the lists into `uptimerobot__monitors` / `__mwindows` / `__psps` / `__alert_contacts`. API key resolution: `api_key` parameter, `api_key_file` (default `~/.uptimerobot`, matching `utr` convention), or `UPTIMEROBOT_API_KEY` environment variable.
20+
* **role:uptimerobot, plugins/modules/uptimerobot_***: New role and a set of nine custom modules to manage UptimeRobot resources directly from a playbook. CRUD modules: `uptimerobot_monitor`, `uptimerobot_mwindow`, `uptimerobot_psp`, plus `uptimerobot_alert_contact` (delete only — UptimeRobot API v2 does not expose creating contacts). Read-only info modules for inspection and dynamic inventories: `uptimerobot_account_info`, `uptimerobot_monitor_info`, `uptimerobot_mwindow_info`, `uptimerobot_alert_contact_info`, `uptimerobot_psp_info`. All CRUD modules support `--check` and `--diff`, are idempotent on re-run, and translate API integer IDs to user-facing labels in both directions. Configuration is done via four inventory lists (`uptimerobot__monitors`, `uptimerobot__mwindows`, `uptimerobot__psps`, `uptimerobot__alert_contacts`). API key resolution: `api_key` parameter, `api_key_file` (default `~/.uptimerobot`), or `UPTIMEROBOT_API_KEY` environment variable.
2121
* **role:at**: Add optional variable `at__service_state` (`reloaded` / `restarted` / `started` / `stopped`) to control the running state of `atd.service` independently from boot autostart. Default behaviour is unchanged: `at__service_enabled: true` keeps the service started, `false` stops it.
2222
* **role:dnf_makecache**: Add optional variables `dnf_makecache__service_state` and `dnf_makecache__timer_state` to control the running state of `dnf-makecache.service` and `dnf-makecache.timer` independently from boot autostart. Default behaviour is unchanged.
2323
* **role:open_vm_tools**: Add optional variables `open_vm_tools__service_enabled` and `open_vm_tools__service_state`. The role previously had no way to disable / stop `vmtoolsd.service`; now the service can be managed like in the other LFOps service-wrapper roles. Default behaviour is unchanged (service enabled and started).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ LFOps also ships a small set of custom modules for resource types that are not c
418418
* **`lvm_pv`** — manage LVM physical volumes.
419419
* **`nextcloud_occ_app`**, **`nextcloud_occ_app_config`**, **`nextcloud_occ_system_config`** — drive Nextcloud `occ` from a playbook.
420420
* **`sqlite_query`** — run SQLite queries.
421-
* **`uptimerobot_*`** — manage UptimeRobot monitors, maintenance windows, public status pages and alert contacts; covers everything the standalone `utr` CLI does, with full idempotency, `--check`, `--diff` and a parallel set of `*_info` modules for read-only inspection. See the [`uptimerobot` role README](roles/uptimerobot/) for the full reference.
421+
* **`uptimerobot_*`** — manage UptimeRobot monitors, maintenance windows, public status pages and alert contacts via the [UptimeRobot API v2](https://uptimerobot.com/api/legacy/), with full idempotency, `--check`, `--diff` and a parallel set of `*_info` modules for read-only inspection. See the [`uptimerobot` role README](roles/uptimerobot/) for the full reference.
422422

423423
Each custom module ships its own `DOCUMENTATION`, `EXAMPLES` and `RETURN` blocks; browse them with `ansible-doc linuxfabrik.lfops.<module>`.
424424

plugins/modules/uptimerobot_account_info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030

3131

3232
EXAMPLES = r'''
33-
# 1) Read account quota and current usage (equivalent to `utr get account`).
34-
# The API key comes from ~/.uptimerobot when no parameter is given.
33+
# 1) Read account quota and current usage. The API key comes from
34+
# ~/.uptimerobot when no parameter is given.
3535
- name: 'Capture UptimeRobot account info'
3636
linuxfabrik.lfops.uptimerobot_account_info:
3737
register: 'ur_account'

plugins/modules/uptimerobot_alert_contact_info.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
- Returns the full list of alert contacts on the UptimeRobot account,
1818
with enum-style fields translated to human-readable labels (C(status),
1919
C(type)).
20-
- Equivalent of C(utr get alert_contacts).
2120
- Read-only. Reports C(changed=false).
2221
author:
2322
- Linuxfabrik GmbH, Zurich, Switzerland (info (at) linuxfabrik (dot) ch)
@@ -38,7 +37,7 @@
3837

3938

4039
EXAMPLES = r'''
41-
# 1) Equivalent to `utr get alert_contacts`.
40+
# 1) List every alert contact on the account.
4241
- name: 'Capture all alert contacts'
4342
linuxfabrik.lfops.uptimerobot_alert_contact_info:
4443
register: 'ur_alert_contacts'

plugins/modules/uptimerobot_monitor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
api_key_file:
3838
description:
3939
- Path to a file containing the UptimeRobot API key. Default
40-
C(~/.uptimerobot) (compatible with the C(utr) CLI).
40+
C(~/.uptimerobot).
4141
type: str
4242
required: false
4343
friendly_name:
@@ -274,8 +274,8 @@
274274
status: 'up'
275275
state: 'present'
276276
277-
# 4) Bulk-pause every monitor of a given prefix (utr equivalent:
278-
# `utr set monitors --status=paused --prefix=001`):
277+
# 4) Bulk-pause every monitor of a given prefix (e.g. before a deployment
278+
# that would otherwise trigger spurious down-alerts):
279279
- name: 'Inventory monitors to pause'
280280
linuxfabrik.lfops.uptimerobot_monitor_info:
281281
search: '001 '
@@ -614,8 +614,8 @@ def main():
614614
desired_compare['mwindows'] = _normalize_desired_mwindows(desired_compare['mwindows'])
615615

616616
# `http_password` and `http_auth_type` can't be diffed reliably because
617-
# the API hides them in `getMonitors` responses (utr's table shows them
618-
# masked as `*****`, our get returns them as null). Always send them
617+
# the API hides them in `getMonitors` responses (the `auth_type` field
618+
# comes back as null even when credentials are set). Always send them
619619
# through on edit when the user supplied them, but don't let them count
620620
# as a change.
621621
write_only = {'http_password', 'http_auth_type'}

plugins/modules/uptimerobot_monitor_info.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
- Returns the full list of monitors on the UptimeRobot account, with
1818
enum-style fields translated to human-readable labels (C(http_method),
1919
C(keyword_type), C(status), C(type), nested C(alert_contacts[].type)).
20-
- Equivalent of C(utr get monitors).
2120
- Read-only. Reports C(changed=false).
2221
author:
2322
- Linuxfabrik GmbH, Zurich, Switzerland (info (at) linuxfabrik (dot) ch)
@@ -43,7 +42,7 @@
4342

4443

4544
EXAMPLES = r'''
46-
# 1) Quick ad-hoc list, equivalent to `utr get monitors`. The API key is read
45+
# 1) Quick ad-hoc list of every monitor on the account. The API key is read
4746
# from ~/.uptimerobot when not passed.
4847
- name: 'Capture all monitors'
4948
linuxfabrik.lfops.uptimerobot_monitor_info:

plugins/modules/uptimerobot_mwindow.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
- Create, update or delete a maintenance window on UptimeRobot.
1818
- Identification is by C(friendly_name). The window is auto-named
1919
C("<type> [<value>] <start_time>-<end_time>") when no C(friendly_name)
20-
is given (e.g. C("weekly mon 03:30-05:30")), matching the convention
21-
used by the C(utr) CLI.
20+
is given (e.g. C("weekly mon 03:30-05:30")).
2221
author:
2322
- Linuxfabrik GmbH, Zurich, Switzerland (info (at) linuxfabrik (dot) ch)
2423
options:

plugins/modules/uptimerobot_mwindow_info.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
- Returns the full list of maintenance windows on the UptimeRobot account,
1818
with enum-style fields translated to human-readable labels (C(type),
1919
C(value), C(status)).
20-
- Equivalent of C(utr get mwindows).
2120
- Read-only. Reports C(changed=false).
2221
author:
2322
- Linuxfabrik GmbH, Zurich, Switzerland (info (at) linuxfabrik (dot) ch)
@@ -38,7 +37,7 @@
3837

3938

4039
EXAMPLES = r'''
41-
# 1) Equivalent to `utr get mwindows`.
40+
# 1) List every maintenance window on the account.
4241
- name: 'Capture all maintenance windows'
4342
linuxfabrik.lfops.uptimerobot_mwindow_info:
4443
register: 'ur_mwindows'

plugins/modules/uptimerobot_psp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
type: str
5555
custom_url:
5656
description:
57-
- Alias for C(custom_domain), accepted for compatibility with the
58-
C(utr) YAML format.
57+
- Alias for C(custom_domain). Accepted as a backward-compatible
58+
spelling.
5959
type: str
6060
password:
6161
description: Optional password to protect the status page.

plugins/modules/uptimerobot_psp_info.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
- Returns the full list of public status pages on the UptimeRobot account,
1818
with enum-style fields translated to human-readable labels (C(sort),
1919
C(status)).
20-
- Equivalent of C(utr get psps).
2120
- Read-only. Reports C(changed=false).
2221
author:
2322
- Linuxfabrik GmbH, Zurich, Switzerland (info (at) linuxfabrik (dot) ch)
@@ -38,7 +37,7 @@
3837

3938

4039
EXAMPLES = r'''
41-
# 1) Equivalent to `utr get psps`.
40+
# 1) List every public status page on the account.
4241
- name: 'Capture all public status pages'
4342
linuxfabrik.lfops.uptimerobot_psp_info:
4443
register: 'ur_psps'

0 commit comments

Comments
 (0)