linuxfabrik.lfops.uptimerobot_psp_info¶
List UptimeRobot Public Status Pages
Synopsis¶
- Calls
getPSPson the UptimeRobot v2 API and returns every public status page on the account. - Enum-coded fields are translated to human-readable labels -
sortbecomesa-z/z-a/up-down-paused/down-up-paused,statusbecomespaused/active. The API fieldcustom_urlis also exposed under the write-side namecustom_domainso it can be diffed against custom_domain on the write module. - Read-only; the module always reports
changed=falseand is safe to run in check mode.
Available since LFOps 6.0.2.
Optional Parameters¶
api_key
- UptimeRobot API key. See
uptimerobot_monitorfor the resolution order. - Type: String.
api_key_file
- Path to a file whose first line is the UptimeRobot API key. Tilde-expanded.
- Type: String.
- Default:
~/.uptimerobot
friendly_name
- Filter the returned list to the PSP whose
friendly_nameis an exact match for this value. The result is still a list (length 0 or 1) for shape stability. - Type: String.
Examples¶
# 1) List every public status page on the account.
- name: 'Capture all public status pages'
linuxfabrik.lfops.uptimerobot_psp_info:
register: 'ur_psps'
- ansible.builtin.debug:
msg: '{{ ur_psps.psps | length }} public status pages on the account'
# 2) Look up a single PSP by friendly_name.
- linuxfabrik.lfops.uptimerobot_psp_info:
friendly_name: 'Status - example.com'
register: 'ur_psp'
- ansible.builtin.debug:
msg: '{{ ur_psp.psps[0].standard_url }} (sort: {{ ur_psp.psps[0].sort }})'
# 3) Reporting: list every paused PSP plus its monitor count.
- linuxfabrik.lfops.uptimerobot_psp_info:
register: 'ur_all'
- ansible.builtin.debug:
msg: >-
Paused PSPs: {{
ur_all.psps
| selectattr("status", "equalto", "paused")
| map(attribute="friendly_name")
| list
}}
Return Values¶
debug
- Diagnostic information about the API call. Stable enough to assert against, not stable enough to be load-bearing.
- Type: Dictionary.
- Returned: always.
-
Sample:
yaml count: 2 operation: list
psps
- List of PSP dicts. Empty list when nothing matched.
- Type: List.
- Returned: always.
Authors¶
- Linuxfabrik GmbH, Zurich, Switzerland (info (at) linuxfabrik (dot) ch)