stephrobert.scaleway.select_resources filter – What a selector designates among resources read from the API

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

Synopsis

  • The counterpart of select_hosts for what does not come from the inventory. The grammar is the same: exactly one of the criteria this product accepts, plus match when several tags are given.

  • An ambiguous name is refused rather than settled, because two resources can carry one name and acting on the first would act on one nobody named.

Aliases: reboot_target

Input

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

Parameter

Comments

Input

dictionary / required

The selector.

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

Parameter

Comments

_resources

list / elements=string / required

The resources to choose among, in the common shape.

kind

string / required

Which product these resources are, which says what a group is.

Examples

- name: The nodes of one pool
  ansible.builtin.set_fact:
    designes: >-
      {{ {'group': 'production'}
         | stephrobert.scaleway.select_resources(noeuds, kind='k8s_node') }}

Return Value

Key

Description

Return value

list / elements=dictionary

The resources the selector designates.

Returned: success