stephrobert.scaleway.fleet_snapshot filter – Build a versioned snapshot of what a read observed
Note
This filter plugin is part of the stephrobert.scaleway collection (version 0.8.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 stephrobert.scaleway.
To use it in a playbook, specify: stephrobert.scaleway.fleet_snapshot.
Synopsis
Turns normalised resources into a snapshot the caller stores wherever it wants, so a later run can say what changed rather than what exists.
Keys every resource on its kind and its identifier. A name is not an identity, because two machines can carry the same name in one zone.
Carries the zones that did not answer, because a diff computed without them would announce the disappearance of a whole fleet.
Aliases: as_scopes, collection_version, scope_label, snapshot_read
Input
This describes the input of the filter, the value before | stephrobert.scaleway.fleet_snapshot.
Parameter |
Comments |
|---|---|
The normalised resources, as |
Keyword parameters
This describes keyword parameters of the filter. These are the values key1=value1, key2=value2 and so on in the following
example: input | stephrobert.scaleway.fleet_snapshot(key1=value1, key2=value2, ...)
Parameter |
Comments |
|---|---|
When the read started, in UTC. |
|
The version of this collection that produced the snapshot. |
|
The zones that answered. |
|
The zones that were asked and did not answer. Default: |
Examples
- name: Keep what this read observed
ansible.builtin.set_fact:
snapshot: >-
{{ faits | stephrobert.scaleway.fleet_snapshot(
scopes_measured=portees_qui_ont_repondu,
scopes_unmeasured=portees_muettes,
captured_at=debut,
collection_version=version) }}
Return Value
Key |
Description |
|---|---|
The snapshot, ready to be serialised by the caller. Returned: success |