summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/jinja2_native_types/test_bool.yml
blob: f3b5e8c0df5bb05b52f139e37f8a3e2b43d8a478 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
- name: test bool True
  set_fact:
      bool_var_true: "{{ b_true }}"

- assert:
    that:
        - 'bool_var_true is sameas true'
        - 'bool_var_true|type_debug == "bool"'

- name: test bool False
  set_fact:
      bool_var_false: "{{ b_false }}"

- assert:
    that:
        - 'bool_var_false is sameas false'
        - 'bool_var_false|type_debug == "bool"'

- name: test bool expr True
  set_fact:
      bool_var_expr_true: "{{ 1 == 1 }}"

- assert:
    that:
        - 'bool_var_expr_true is sameas true'
        - 'bool_var_expr_true|type_debug == "bool"'

- name: test bool expr False
  set_fact:
      bool_var_expr_false: "{{ 2 + 2 == 5 }}"

- assert:
    that:
        - 'bool_var_expr_false is sameas false'
        - 'bool_var_expr_false|type_debug == "bool"'

- name: test bool expr with None, True
  set_fact:
      bool_var_none_expr_true: "{{ None == None }}"

- assert:
    that:
        - 'bool_var_none_expr_true is sameas true'
        - 'bool_var_none_expr_true|type_debug == "bool"'

- name: test bool expr with None, False
  set_fact:
      bool_var_none_expr_false: "{{ '' == None }}"

- assert:
    that:
        - 'bool_var_none_expr_false is sameas false'
        - 'bool_var_none_expr_false|type_debug == "bool"'