stephrobert.scaleway.audit_changes filter – What is new, what persists, what is resolved

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.audit_changes.

Synopsis

  • Compares the findings of two audits by their stable identity, and sorts them into new, persisting and resolved. A report that shows the same warnings every morning stops being read by the third morning.

  • A finding that vanished because its scope did not answer never comes out as resolved. It comes out as unmeasured, which is not the same thing and does not send anybody the message that their problem is fixed.

  • Stamps first_seen on a new finding and carries it over on a persisting one, so the date goes back as far as the caller kept its reports. It is never invented when the caller has none.

Aliases: changes_verdict

Input

This describes the input of the filter, the value before | stephrobert.scaleway.audit_changes.

Parameter

Comments

Input

list / elements=string / required

The findings of this run.

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.audit_changes(key1=value1, key2=value2, ...)

Parameter

Comments

now

string / required

The reference instant, in UTC.

previous

list / elements=string

The findings of the previous run, as they were kept. none says there is no previous run, which is not the same as a previous run with no findings.

scopes_measured

list / elements=string / required

The scopes this run read, each as {type, name}. A region and a zone can carry lookalike names, and nothing in the string tells them apart.

Examples

- name: What moved since the last audit
  ansible.builtin.set_fact:
    changements: >-
      {{ constats | stephrobert.scaleway.audit_changes(
           previous=constats_gardes | default(none),
           scopes_measured=portees_lues,
           now=now(utc=true, fmt='%Y-%m-%dT%H:%M:%SZ')) }}

Return Value

Key

Description

Return value

dictionary

The three sets, what could not be concluded, and their counts.

Returned: success