mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-22 04:40:23 -07:00
Disable hostname check (#38)
* Add changelog fragment * Add check_hostname option * Propagate check_hostname option across the collection * Update documentation fragment * Propagate test to all other plugins * Remove stray line * Give test user privileges to run test operations * Extend integration tests job matrix * Add caution note to documentation fragment. * Update matrix job name * Rearrange job matrix * Fix sanity issues * Fix issue with mysqldb silently failing to update out of range variables * Fix variable overwrite * Ignore `check_hostname` when using MySQLdb * Update plugins/doc_fragments/mysql.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/doc_fragments/mysql.py Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update changelogs/fragments/35-disable-hostname-check.yml Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
parent
dc98327483
commit
8c79011dbd
32 changed files with 680 additions and 135 deletions
|
@ -141,7 +141,7 @@
|
|||
- name: set mysql variable value to an expression
|
||||
mysql_variables:
|
||||
<<: *mysql_params
|
||||
variable: max_tmp_tables
|
||||
variable: max_connect_errors
|
||||
value: "1024*4"
|
||||
register: result
|
||||
ignore_errors: true
|
||||
|
@ -151,15 +151,22 @@
|
|||
# ============================================================
|
||||
# Verify mysql_variable fails when setting an incorrect value (out of range)
|
||||
#
|
||||
- shell: pip show pymysql | awk '/Version/ {print $2}'
|
||||
register: pymysql_version
|
||||
|
||||
- name: set mysql variable value to a number out of range
|
||||
mysql_variables:
|
||||
<<: *mysql_params
|
||||
variable: max_tmp_tables
|
||||
variable: max_connect_errors
|
||||
value: -1
|
||||
register: result
|
||||
register: oor_result
|
||||
ignore_errors: true
|
||||
|
||||
- include: assert_fail_msg.yml output={{ result }} msg='Truncated incorrect'
|
||||
- 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'
|
||||
when: pymysql_version.stdout != ""
|
||||
|
||||
# ============================================================
|
||||
# Verify mysql_variable fails when setting an incorrect value (incorrect type)
|
||||
|
@ -167,12 +174,12 @@
|
|||
- name: set mysql variable value to a non-valid value number
|
||||
mysql_variables:
|
||||
<<: *mysql_params
|
||||
variable: max_tmp_tables
|
||||
variable: max_connect_errors
|
||||
value: TEST
|
||||
register: result
|
||||
register: nvv_result
|
||||
ignore_errors: true
|
||||
|
||||
- include: assert_fail_msg.yml output={{ result }} msg='Incorrect argument type to variable'
|
||||
- include: assert_fail_msg.yml output={{ nvv_result }} msg='Incorrect argument type to variable'
|
||||
|
||||
# ============================================================
|
||||
# Verify mysql_variable fails when setting an unknown variable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue