stephrobert.scaleway.audit_exceptions filter – Turn policy exceptions into statuses, never into deletions
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_exceptions.
Synopsis
Marks the findings an exception covers as suppressed rather than removing them. A finding that was erased is a problem nobody knows about any more.
Refuses an exception without a reason, without an owner or without an expiry, because each of those turns an exception into a rule quietly switched off.
An expired exception becomes a finding of its own rather than a refusal. Refusing the whole policy over one stale line would turn off the audit.
Input
This describes the input of the filter, the value before | stephrobert.scaleway.audit_exceptions.
Parameter |
Comments |
|---|---|
The findings, 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.audit_exceptions(key1=value1, key2=value2, ...)
Parameter |
Comments |
|---|---|
The exceptions the policy carries. |
|
The reference instant, in UTC. |
|
The normalised resources the findings speak about. |
Examples
- name: Apply the policy's exceptions
ansible.builtin.set_fact:
juge: >-
{{ constats | stephrobert.scaleway.audit_exceptions(
exceptions=politique.exceptions | default([]),
resources=faits,
now=now(utc=true, fmt='%Y-%m-%dT%H:%M:%SZ')) }}
Return Value
Key |
Description |
|---|---|
The findings with their status, and what the exceptions say. Returned: success |