stephrobert.scaleway.resource_facts filter – Normalise a product payload into the shape rules speak

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

Synopsis

  • Turns what a reading module returned into the common shape the audit rules are written against, so a rule never names a product’s own fields.

  • Refuses a product it does not know rather than normalising it as best it can, because a missing field and an unreadable one look alike.

Input

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

Parameter

Comments

Input

list / elements=string / required

What the reading module returned, one product’s payloads.

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

Parameter

Comments

kind

string / required

Which product these payloads come from.

Examples

- name: Normalise what the zones answered
  ansible.builtin.set_fact:
    faits: >-
      {{ machines | stephrobert.scaleway.resource_facts(kind='instance') }}

Return Value

Key

Description

Return value

list / elements=dictionary

One normalised resource per payload.

Returned: success