sap / sap.sap_operations / 1.25.0 / test / all Return true if all elements in the iterable are truthy. | "added in version" 1.7.0-galaxy of sap.sap_operations" Authors: Kirill Satarin (@kksat)sap.sap_operations.all (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 all elements in the iterable are truthy.
If not iterable, return the truthyness of value provided.
Returns True if the iterable is empty (empty list, or empty string).
Behaves like the Python builtin all function (for Iterable)
If not Iterable provided, behaves like the Python builtin bool function (for value)
- name: Test 'all' test plugin, this assertion is True ansible.builtin.assert: that: "{{ [true, true] is sap.sap_operations.all }}"
- name: Test 'all' test plugin, this assertion is True ansible.builtin.assert: that: "{{ ['true', 'false'] is sap.sap_operations.all }}"
- name: Test 'all' test plugin, this assertion is True ansible.builtin.assert: that: "{{ [1, 1] is sap.sap_operations.all }}"
- name: Test 'all' test plugin, this assertion is True ansible.builtin.assert: that: "{{ not ([1, 0] is sap.sap_operations.all) }}"
- name: Test 'all' test plugin, this assertion is True ansible.builtin.assert: that: "{{ ['1', '0'] is sap.sap_operations.all }}"
- name: Test 'all' test plugin, this assertion is True ansible.builtin.assert: that: "{{ 1 is sap.sap_operations.all }}"
- name: Test 'all' test plugin, this assertion is True ansible.builtin.assert: that: "{{ not ( 0 is sap.sap_operations.all ) }}"
- name: Test 'all' test plugin, this assertion is True ansible.builtin.assert: that: "{{ '' is sap.sap_operations.all }}"
- name: Test 'all' test plugin, this assertion is True ansible.builtin.assert: that: "{{ ' ' is sap.sap_operations.all }}"
- name: Test 'all' test plugin, this assertion is True ansible.builtin.assert: that: "{{ {1: 2} is sap.sap_operations.all }}"
- name: Test 'all' test plugin, this assertion is True ansible.builtin.assert: that: "{{ not ( None is sap.sap_operations.all ) }}"
value: description: Iterable to check, if not iterable, return the truthyness of value provided. required: true
_value: description: True if all elements in the iterable are truthy or value provided is truthy. example: true type: boolean