ramondevprivate.common.fleet_snapshot filter – Build the fleet snapshot of one host from its facts
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_snapshot.
New in ramondevprivate.common 1.0.0
Synopsis
Reduces
ansible_factsto what the fleet inventory documents. OS, kernel, cores, RAM, disk capacity of real filesystems, and the IP addresses of relevant interfaces.Bind mounts and pseudo filesystems are not counted, and each device counts once.
Interfaces
lo,docker0,br-*andveth*are skipped.
Input
This describes the input of the filter, the value before | ramondevprivate.common.fleet_snapshot.
Parameter |
Comments |
|---|---|
The |
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_snapshot(positional1, positional2, ...)
Parameter |
Comments |
|---|---|
Inventory name of the host. |
|
Collection time as ISO 8601 string. |
|
The |
Examples
- name: Build snapshot
ansible.builtin.set_fact:
snapshot: >-
{{ ansible_facts | ramondevprivate.common.fleet_snapshot(inventory_hostname, now(utc=true, fmt='%Y-%m-%dT%H:%M:%SZ'),
fleet_info_result.fleet) }}
Return Value
Key |
Description |
|---|---|
The snapshot, as stored in the JSON files. Returned: success |