ansible.builtin.type_debug filter – show input data type

Note

This filter plugin is part of ansible-core and included in all Ansible installations. In most cases, you can use the short plugin name type_debug even without specifying the collections: keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same filter plugin name.

New in Ansible 2.3

Synopsis

  • Returns the equivalent of Python’s type function.

Input

This describes the input of the filter, the value before | ansible.builtin.type_debug.

Parameter

Comments

Input

any / required

Variable or expression of which you want to determine type.

Examples

# get type of 'myvar'
{{ myvar | type_debug }}

Return Value

Key

Description

Return value

string

The Python ‘type’ of the _input provided.

Returned: success

Authors

  • Adrian Likins (@alikins)

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.