eslam-gomaa / mysql_secure_installation_Ansible

Idempotent Ansible Module that provides the functions of "mysql_secure_installation" script
43 stars 22 forks source link

fixed version compare #15

Open TheRealDarklord opened 1 year ago

TheRealDarklord commented 1 year ago

Comparing versions on a numeric base results in the unexpected truth that float(10.11) is smaller than float(10.4).

This leads to the wrong queries being used on newer mysql/maria db installations (>=10.10) as the comparison flag was being set to false.

To achieve a version comparison which respects version strings and their ordering the python package "packaging" is used. This way the version comparison works as expected and now the right queries are used.