I’ve opened a pull request for an idempotent MySQL module. The user management stuff is working, and I will work on databases next. At the moment I’m just looking for feedback on coding style, approach, etc. as I’d like to get this into core.
https://github.com/ansible/ansible/pull/580
Usage:
Ensure that a user named ‘bob’ exists with a password of ‘12345’:
mysql user=bob passwd=12345 state=present
Ensure that the user ‘bob’ is removed:
mysql user=bob state=absent
Ensure that the user ‘bob’ has all privileges on the ‘invoices’ database and SELECT,UPDATE on the ‘customer’ database:
mysql user=bob priv=invoices.:ALL/customer.:SELECT,UPDATE state=present
All feedback welcome!
Thanks all
Mark