mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-25 07:21:45 -07:00
Fix bool comparison
This commit is contained in:
parent
67c8e0b2f2
commit
f08bc20798
4 changed files with 5 additions and 5 deletions
|
@ -22,4 +22,4 @@
|
|||
- name: assert message failure (expect failed=true)
|
||||
assert:
|
||||
that:
|
||||
- "output.failed == true"
|
||||
- "output.failed | bool == true"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue