stephrobert.scaleway.audit_findings filter – Judge a fleet against a policy, rule by rule

Note

This filter plugin is part of the stephrobert.scaleway collection (version 0.7.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_findings.

Synopsis

  • Returns one finding per rule a resource breaks, each naming the rule, its severity and what was read.

  • Refuses a rule nothing can settle, a severity that is not one, and a policy with no rule at all, because a policy that checks nothing produces a green report on nothing.

Aliases: audit_refusals

Input

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

Parameter

Comments

Input

list / elements=string / required

The machines to judge, as the reading module returned them.

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

Parameter

Comments

now

string / required

The instant durations are measured from, ISO 8601.

policy

dictionary / required

The rules and their severities.

Examples

- name: Judge what the zones answered
  ansible.builtin.set_fact:
    constats: >-
      {{ machines | stephrobert.scaleway.audit_findings(
           policy=scaleway_fleet_audit_policy,
           now=now(utc=true, fmt='%Y-%m-%dT%H:%M:%SZ')) }}

Return Value

Key

Description

Return value

list / elements=dictionary

One finding per rule a resource breaks.

Returned: success