Skip to content

any

Collection Note

This module is part of the ansible.builtin collection. To install the collection, use:

ansible-galaxy collection install ansible.builtin
Added in version 2.4.

Synopsis

  • This test checks each condition in a list for truthiness.
  • Same as the C(any) Python function.

Parameters

Parameter Defaults / Choices Comments
_input
list / elements=raw
required
List of conditions, each can be a boolean or conditional expression that results in a boolean value.

Examples

varexpression: "{{ 3 == 3 }}"
# is any statement true?
{{ [false, booleanvar, varexpression] is any}}

Return Values

Key Data Type Description Returned
_value boolean Returns V(True) if any element of the list was true, V(False) otherwise.

Authors

  • Ansible Core