Skip to content

Commit

Permalink
Run MySQL commands with the mysql_command variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge-Rodriguez authored Jul 24, 2020
1 parent 7643a37 commit e7e0354
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/integration/targets/test_mysql_user/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,12 @@
- result is changed

- name: retrieve TLS requiremets for users in old database version
command: mysql -L -N -s -e "SHOW GRANTS for '{{ user_name_1 }}'@'localhost'"
command: "{{ mysql_comnand }} -L -N -s -e \"SHOW GRANTS for '{{ user_name_1 }}'@'localhost'\""

This comment has been minimized.

Copy link
@nerijus

nerijus Jul 24, 2020

typo - should be command, not comnand

register: old_result
when: db_version.version.major <= 5 and db_version.version.minor <= 6 or db_version.version.major == 10 and db_version.version.minor < 2

- name: retrieve TLS requiremets for users in new database version
command: mysql -L -N -s -e "SHOW CREATE USER '{{ user_name_1 }}'@'localhost'"
command: "{{ mysql_command }} -L -N -s -e \"SHOW CREATE USER '{{ user_name_1 }}'@'localhost'\""
register: new_result
when: db_version.version.major >= 5 and db_version.version.major < 10 and db_version.version.minor > 6 or db_version.version.major == 10 and db_version.version.minor >= 2

Expand All @@ -258,12 +258,12 @@
X509:

- name: retrieve TLS requiremets for users in old database version
command: mysql -L -N -s -e "SHOW GRANTS for '{{ user_name_1 }}'@'localhost'"
command: "{{ mysql_command }} -L -N -s -e \"SHOW GRANTS for '{{ user_name_1 }}'@'localhost'\""
register: old_result
when: db_version.version.major <= 5 and db_version.version.minor <= 6 or db_version.version.major == 10 and db_version.version.minor < 2

- name: retrieve TLS requiremets for users in new database version
command: mysql -L -N -s -e "SHOW CREATE USER '{{ user_name_1 }}'@'localhost'"
command: "{{ mysql_command }} -L -N -s -e \"SHOW CREATE USER '{{ user_name_1 }}'@'localhost'\""
register: new_result
when: db_version.version.major >= 5 and db_version.version.major < 10 and db_version.version.minor > 6 or db_version.version.major == 10 and db_version.version.minor >= 2

Expand Down

0 comments on commit e7e0354

Please sign in to comment.