Fix bool comparison

This commit is contained in:
Laurent Indermuehle 2022-08-11 11:37:41 +02:00
commit f08bc20798
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09
4 changed files with 5 additions and 5 deletions

View file

@ -22,4 +22,4 @@
- name: assert message failure (expect failed=true)
assert:
that:
- "output.failed == true"
- "output.failed | bool == true"

View file

@ -22,7 +22,7 @@
- name: assert output message changed value
assert:
that:
- "output.changed == {{ changed }}"
- "output.changed | bool == changed | bool"
- name: run mysql command to show variable
command: "{{ mysql_command }} \"-e show variables like '{{ var_name }}'\""
@ -31,6 +31,6 @@
- name: assert output mysql variable name and value
assert:
that:
- "result.changed == true"
- "result.changed | bool == true"
- "'{{ var_name }}' in result.stdout"
- "'{{ var_value }}' in result.stdout"

View file

@ -22,7 +22,7 @@
- name: assert output message changed value
assert:
that:
- "output.changed == {{ changed }}"
- "output.changed | bool == changed | bool"
- set_fact:
key_name: "{{ var_name }}"

View file

@ -162,7 +162,7 @@
register: oor_result
ignore_errors: true
- include: assert_var.yml changed=false output={{ oor_result }} var_name=max_connect_errors var_value=1
- include: assert_var.yml changed=true output={{ oor_result }} var_name=max_connect_errors var_value=1
when: pymysql_version.stdout == ""
- include: assert_fail_msg.yml output={{ oor_result }} msg='Truncated incorrect'