This turned out to be a fairly bad idea. It begun as a way to try
and mirror what happens in the postgresql module for consistency
but instead made things complex.
I've changed it to have the override_options in mysql::server which
leads much more naturally out of the design and shape of MySQL.
The quote is need for username and host in mysql grant. revoke and grant function is already doing it with cmd_user(). not sure why the constructor didn't do it. This patch fixed#261 and #262.
Handful of changes here, such as removing flush (so that mysql_user
can be used for root password changes) and other tweaks here.
Add time option to mysql::backup.
This work adds a new mysql::globals class which contains a hash used to
build my.cnf from. It's used to share this data across multiple classes
so that the client and server can share this data.
End users can modify content in my.cnf by including mysql::globals and
passing in override_options as a hash that looks like:
override_options = { 'mysqld' => { 'max_connections' => '120' } }
This completely replaces the mess of parameters that existed in the main
mysql class before.
Completely refactor mysql::server and rework the API. This changes
ordering, changes from execs{} to mysql_user for the root password,
removes some functionality (like the etc_root_password), and generally
makes some tough decisions about how mysql::server should be built.
This initial round of work focuses on adding the concept of
mysql::globals to the module. This is a shared place to provide all the
data the module needs, and then clients, servers, and providers can all
rely on this information to set things up.
This is being primarily used at first to allow a default_options hash
that contains all the previous parameters and takes a overrides_options
that allows you to then further customize any of the options in my.cnf.
This provider has undergone the largest set of changes and currently
just accepts a full SQL grant string as the name and then applies it,
making things easier for DBAs and removes the awkward attempts at
modelling grants into Puppet.
This work adds max_connections_per_hour, max_queries_per_hour, and
max_updates_per_hour support to the provider and extends self.instances to add
in the new parameters when checking existing users. It also adds
self.prefetch in order to speed up Puppet runs.
Provider is also switched to using mk_resource_methods to generate
all the resource readers, and exists? and other methods now use the
property_hash where appropriate.
Tests rewritten to handle changes and extend code coverage.
Add collate as a new managable parameter, and extend self.instances to
add in all parameters when checking existing databases. It also adds
self.prefetch in order to speed up Puppet runs.
Provider is also switched to using mk_resource_methods to generate
all the resource readers, and exists? and other methods now use the
property_hash where appropriate.
Tests rewritten to handle changes and extend code coverage.