sap / sap.sap_operations / 1.25.0 / test / any Return true if any element in the iterable is truthy. | "added in version" 1.7.0-galaxy of sap.sap_operations" Authors: Kirill Satarin (@kksat)sap.sap_operations.any (1.25.0) — test
Install with ansible-galaxy collection install sap.sap_operations:==1.25.0
collections: - name: sap.sap_operations version: 1.25.0
Return true if any element in the iterable is truthy.
If not iterable, return the truthyness of value provided.
Returns False if the iterable is empty (empty list, or empty string).
Behaves like the Python builtin any function (for Iterable)
If not Iterable provided, behaves like the Python builtin bool function (for value)
- name: Test 'any' test plugin, this assertion is True ansible.builtin.assert: that: "{{ [true, true] is sap.sap_operations.any }}"
- name: Test 'any' test plugin, this assertion is True ansible.builtin.assert: that: "{{ ['true', 'false'] is sap.sap_operations.any }}"
- name: Test 'any' test plugin, this assertion is True ansible.builtin.assert: that: "{{ [1, 1] is sap.sap_operations.any }}"
- name: Test 'any' test plugin, this assertion is True ansible.builtin.assert: that: "{{ ([1, 0] is sap.sap_operations.any) }}"
- name: Test 'any' test plugin, this assertion is True ansible.builtin.assert: that: "{{ ['1', '0'] is sap.sap_operations.any }}"
- name: Test 'any' test plugin, this assertion is True ansible.builtin.assert: that: "{{ 1 is sap.sap_operations.any }}"
- name: Test 'any' test plugin, this assertion is True ansible.builtin.assert: that: "{{ not ( 0 is sap.sap_operations.any ) }}"
- name: wer Test 'any' test plugin, this assertion is True ansible.builtin.assert: that: "{{ not ( '' is sap.sap_operations.any ) }}"
- name: Test 'any' test plugin, this assertion is True ansible.builtin.assert: that: "{{ ' ' is sap.sap_operations.any }}"
- name: Test 'any' test plugin, this assertion is True ansible.builtin.assert: that: "{{ {1: 2} is sap.sap_operations.any }}"
- name: Test 'any' test plugin, this assertion is True ansible.builtin.assert: that: "{{ not ( None is sap.sap_operations.any ) }}"
value: description: Iterable to check, if not iterable, return the truthyness of value provided. required: true
_value: description: True if any element in the iterable is truthy or value provided is truthy. example: true type: boolean