In order to work on db automation, it would be good to have native mysql support in spicerack (i.e. the ability to use something like pymysql to talk directly to mysql servers). The existing module mysql_legacy executes the mysql cmdline client, which is fine for very simple queries, but is problematic for anything more complex.
An example use-case is {T199061}. This requires running queries against a large number of hosts and returning more than a simple single value from each.
To begin with, the new spicerack module should provide a pymysql instance to the caller, with DRY-RUN support (to the extent possible). This should use the existing .my.cnf approach, so that callers don't have to parse .my.cnf themselves, and generally provide sensible defaults so that each cookbook doesn't have to do the common configuration itself.
The next stage would be to add selecting database hosts by role, similar to how MysqlLegacy.get_core_dbs() works, but in a more flexible way.
My plan is to do this in smaller steps and iterate, as i'm not familiar enough with the problem-space to be able to write a full design from the outset.