Skip to content

issubset

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

  • Validate if the first list is a sub set (is included) of the second list.

Parameters

Parameter Defaults / Choices Comments
_input
list / elements=raw
required
List.
_superset
list / elements=raw
required
List to test against.

Examples

big: [1,2,3,4,5]
small: [3,4]
issmallinbig: '{{ small is subset(big) }}'

Return Values

Key Data Type Description Returned
_value boolean Returns V(True) if the specified list is a subset of the provided list, V(False) otherwise.

Authors

  • Ansible Core