bertvv / ansible-role-mariadb

Install MariaDB on RHEL/CentOS 7 or Fedora.
https://galaxy.ansible.com/bertvv/mariadb/
Other
144 stars 108 forks source link

Move 'mariadb_service' from vars/ to defaults/. #15

Closed moenka closed 6 years ago

moenka commented 6 years ago

Hi, I like your role as it helps setting up MariaDB very easily on RedHad distributions. There is but one big issue with MariaDB 5.5 (which can be easily installed with this role). On CentOS the service for MariaDB 5.5 is called mysql not mariadb. Unfortunately the mariadb_service is located with the vars/ directory which makes it unchangeable/unconfigurable. This causes the role to fail for MariaDB <10. I'd like to suggest moving this variable into the defaults/ directory so one has the chance to overwrite this variable.

This would be the fast solution. The better solution would be to check on the mariadb_version variable and change the mariadb_service variable to mysql if the version is lower then 10 on a CentOS distribution.

moenka commented 6 years ago

I just saw that the handlers.yml also needs an update on the restart mariadb task where the name attribute has to be catched from the mariadb_service variable. This is not super urgent so I try to provide a pull request on this.

bertvv commented 6 years ago

Fixed in a18f0dc and v2.1.0, just released! Sorry it took so long! It was a simple enough fix...

moenka commented 6 years ago

Thanks anyway.