Simplify connector_name variables

This commit is contained in:
Laurent Indermuehle 2023-01-13 16:22:35 +01:00
commit 199b7a5b64
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09
11 changed files with 44 additions and 26 deletions

View file

@ -17,9 +17,9 @@
shell: 'echo "" >> {{ config_file }}'
when:
- >
connector_name is not search('pymysql')
connector_name != 'pymysql'
or (
connector_name is search('pymysql')
connector_name == 'pymysql'
and connector_ver is version('0.9.3', '>=')
)
@ -30,9 +30,9 @@
mode: '0777'
when:
- >
connector_name is not search('pymysql')
connector_name != 'pymysql'
or (
connector_name is search('pymysql')
connector_name == 'pymysql'
and connector_ver is version('0.9.3', '>=')
)
@ -43,9 +43,9 @@
insertafter: EOF
when:
- >
connector_name is not search('pymysql')
connector_name != 'pymysql'
or (
connector_name is search('pymysql')
connector_name == 'pymysql'
and connector_ver is version('0.9.3', '>=')
)

View file

@ -54,12 +54,14 @@
- assert:
that:
- result is failed
when: connector_name is search('pymysql')
when:
- connector_name == 'pymysql'
- assert:
that:
- result is succeeded
when: connector_name is not search('pymysql')
when:
- connector_name != 'pymysql'
- name: attempt connection with newly created user ignoring hostname
mysql_db: