ansible.builtin.nan test – is this not a number (NaN)

Note

This test plugin is part of ansible-core and included in all Ansible installations. In most cases, you can use the short plugin name nan 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 test plugin name.

Synopsis

  • Whether the input is a special floating point number called not a number.

Aliases: is_file, isnan

Input

This describes the input of the test, the value before is ansible.builtin.nan or is not ansible.builtin.nan.

Parameter

Comments

Input

any / required

Possible number representation or string that can be converted into one.

Examples

isnan: "{{ '42' is nan }}"

Return Value

Key

Description

Return value

boolean

Returns True if the input is NaN, False if otherwise.

Returned: success

Authors

  • Ansible Core

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.