ns2.col.bar filter – The bar filter

Note

This filter plugin is part of the ns2.col collection (version 2.1.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 ns2.col.

To use it in a playbook, specify: ns2.col.bar.

New in ns2.col 2.0.0

Synopsis

Input

This describes the input of the filter, the value before | ns2.col.bar.

Parameter

Comments

Input

dictionary / required

The main input.

Positional parameters

This describes positional parameters of the filter. These are the values positional1, positional2 and so on in the following example: input | ns2.col.bar(positional1, positional2, ...)

Parameter

Comments

foo

list / elements=dictionary / required

Some foo.

bar

boolean

And some bar.

Choices:

  • false ← (default)

  • true

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

Parameter

Comments

baz

string

Something else.

Choices:

  • "a": Whatever a is.

  • "b": What is b? I don’t know.

  • "cde": This is some more unknown. There are rumors this is related to the alphabet.

  • "foo" (default): Our default value, the glorious foo.

    Even has two paragraphs.

Notes

Note

  • When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters: input | ns2.col.bar(positional1, positional2, key1=value1, key2=value2)

Examples

{'a': 1} | ns2.col.bar({'b': 2}, baz='cde')

Return Value

Key

Description

Return value

dictionary

The result.

Returned: success