ansible.builtin.superset test – is the list a superset of this other list
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 superset
. However, we recommend you use the Fully Qualified Collection Name (FQCN) ansible.builtin.superset
for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same test plugin name.
Synopsis
- Validate if the first list is a super set (includes) the second list.
Aliases: issuperset
Input
This describes the input of the test, the value before is ansible.builtin.superset
or is not ansible.builtin.superset
.
Parameter | Comments |
---|---|
Input list / elements=any / required | List. |
Keyword parameters
This describes keyword parameters of the test. These are the values key1=value1
, key2=value2
and so on in the following examples: input is ansible.builtin.superset(key1=value1, key2=value2, ...)
and input is not ansible.builtin.superset(key1=value1, key2=value2, ...)
Parameter | Comments |
---|---|
_subset list / elements=any / required | List to test against. |
Examples
big: [1,2,3,4,5] small: [3,4] issmallinbig: '{{ big is superset(small) }}'
Return Value
Key | Description |
---|---|
Return value boolean | Returns Returned: success |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2024 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/superset_test.html