capable.core219.apply
Apply a callable to a value.
Apply function to value and return result of function(value).
Parameters
Section titled “Parameters”_input (required)
Section titled “_input (required)”Type: raw · Required: yes
Input value passed to O(function).
function (required)
Section titled “function (required)”Type: raw · Required: yes
Callable object to apply, for example one returned by P(capable.core219.lambda#filter).
Examples
Section titled “Examples”- name: Apply callable from lambda lookup vars: adder: "{{ lookup('capable.core219.lambda', 'lambda x: x + 1') }}" ansible.builtin.assert: that: - (4 | capable.core219.apply(adder)) == 5Return Values
Section titled “Return Values”Type: raw
Result of function(value) call.
Authors
Section titled “Authors”- Kirill Satarin (@kksat)