mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
- 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"'
|