Backport tls_requirements simplified and deduplified tests

(cherry picked from commit ac5a339644)
This commit is contained in:
Laurent Indermuehle 2022-11-10 10:30:27 +01:00
commit c121af0ff6
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09

View file

@ -167,10 +167,9 @@
tls_requires: tls_requires:
- name: retrieve TLS requirements for users - name: retrieve TLS requirements for users
command: "{{ mysql_command }} -L -N -s -e \"SHOW GRANTS for '{{ user_name_1 }}'@'localhost'\"" command: "{{ mysql_command }} -L -N -s -e \"SHOW CREATE USER '{{ user_name_1 }}'@'localhost'\""
register: result register: result
- name: assert user1 TLS requirements - name: assert user1 TLS requirements
assert: assert:
that: "'REQUIRE ' not in result.stdout or 'REQUIRE NONE' in result.stdout" that: "'REQUIRE ' not in result.stdout or 'REQUIRE NONE' in result.stdout"