blob: 86ba35388f34740245bac5e6b5dd11c511730115 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
DOCUMENTATION:
name: bool
version_added: "historical"
short_description: cast into a boolean
description:
- Attempt to cast the input into a boolean (C(True) or C(False)) value.
positional: _input
options:
_input:
description: Data to cast.
type: raw
required: true
EXAMPLES: |
# simply encrypt my key in a vault
vars:
isbool: "{{ (a == b)|bool }} "
otherbool: "{{ anothervar|bool }} "
# in a task
...
when: some_string_value | bool
RETURN:
_value:
description: The boolean resulting of casting the input expression into a C(True) or C(False) value.
type: bool
|