ns2.col.foo lookup – Look up some foo bar

Note

This lookup 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.foo.

New in ns2.col 1.0.0

Synopsis

Terms

Parameter

Comments

Terms

list / elements=string / required

The stuff to look up.

Keyword parameters

This describes keyword parameters of the lookup. These are the values key1=value1, key2=value2 and so on in the following examples: lookup('ns2.col.foo', key1=value1, key2=value2, ...) and query('ns2.col.foo', key1=value1, key2=value2, ...)

Parameter

Comments

bar

string

Foo bar.

Configuration:

  • Variable: foo_bar

Notes

Note

  • When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters: lookup('ns2.col.foo', term1, term2, key1=value1, key2=value2) and query('ns2.col.foo', term1, term2, key1=value1, key2=value2)

Examples

- name: Look up bar
  ansible.builtin.debug:
    msg: "{{ lookup('ns2.col.foo', 'bar') }}"

Return Value

Key

Description

Return value

list / elements=string

The resulting stuff.

Returned: success

Authors

  • Felix Fontein (@felixfontein)