ramondevprivate.common.fleet_unreached filter – Mark the stored snapshots of hosts a run could not collect
Note
This filter plugin is part of the ramondevprivate.common collection (version 1.0.0).
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 ramondevprivate.common.
To use it in a playbook, specify: ramondevprivate.common.fleet_unreached.
New in ramondevprivate.common 1.0.0
Synopsis
Returns the stored snapshots of the given hosts with
unreached_sinceset totimestamp, or kept if an earlier run already set it. Everything else in a snapshot stays as stored.Written back to the data directory, the marker survives runs that don’t target the host (
--limit); the next successful collection replaces the snapshot and so removes it.Hosts without a stored snapshot are not returned.
Input
This describes the input of the filter, the value before | ramondevprivate.common.fleet_unreached.
Parameter |
Comments |
|---|---|
Snapshots read from the data directory. |
Positional parameters
This describes positional parameters of the filter. These are the values positional1, positional2 and so on in the following
example: input | ramondevprivate.common.fleet_unreached(positional1, positional2, ...)
Parameter |
Comments |
|---|---|
Hosts targeted in this run whose snapshot could not be collected. |
|
Time of this run as ISO 8601 string. |
Examples
- name: Mark unreached hosts
ansible.builtin.set_fact:
unreached: >-
{{ stored | ramondevprivate.common.fleet_unreached(ansible_play_hosts_all | difference(ansible_play_hosts),
now(utc=true, fmt='%Y-%m-%dT%H:%M:%SZ')) }}
Return Value
Key |
Description |
|---|---|
The marked snapshots, as stored plus Returned: success |