Prevously, the server class declared the config class and
the config class had a relationship to the server class.
This actually meant that the config class could never be declared
by itself b/c it exlicity depended on the server class (which it
could never resolve externally b/c it would result in a redeclaration
of the config class itself.)
This issue actually made it impossible to test the manifest on its
own with rspec-puppet. This commit makes it much easier to write
rspec tests for the config class.
Since the set_mysql_rootpw exec is only created
when the password is being managed, having the mysql
resource (which always exists) reference it leads
to an error when the mysql root password is not being
managed.
This commit resolves the issue by having the set
mysql rootpw exec notify the mysql restart if it
changes.
This commit displays the detected osfamily that
is not supported by this module.
It was previously unclear to users seeing the failure
what the value of osfamily was that was causing the
failure.
This is a major change to the module and would be released as a new
version.
* Add self.instances to database and database_user for puppet resource.
* Update database provider to use flush method.
* Update module to conform to puppet-lint recommendations.
* Cleanup some unecessary logic in mysql::db define type.
* Move mysql_restart to config class.
* Use class to class dependency instead of resource dependency.
* Change appropriate rspec-puppet tests.
* Add fixtures directory to simplify testing.
* Update raketask and spec_helper to reflect fixture changes.
* Update mysql_password function to support validation.
* Move client installation to a separate class.
* Update documentation and readme.
ever hit the default.
Moving the variables to just after the case statement will set
them, removing the default part of the case will cause this class
to fail on unsupported distros.
Commit e3b9fd broke the mysql::db defined type by always notifying the
Exec[${name}-import-import] resource even though the resource may not be
declared if the $sql parameter was not given. This commit adds an
in-selector to only notify the Exec resource if the $sql parameter has a
value. More extensive rspec-puppet tests have been provided to protect
against this in the future.
Previous to this commit, if the sql parameter was provided to a
declaration of the mysql::db defined type, the defined type would always
load the sql script on every catalog run. This changes the exec that
loads that sql script to be refreshonly unless the enforce_sql parameter
is set to true.
Configuration was moved to config hash param of the mysql::server class.
This was done so that additional parameters can be
added in the future and not have to be added to
both mysql::config and mysql::server as class params
This patch updates the README, docs, and examples to
correctly use the parameter.
/etc/mysql/my.cnf was being managed and /etc/mysql was not.
This was causing failures if the directory was not created
by the package.
This commit manages it in case it was not created by the package.
It makes way more sense to just allow it as a
class param.
Also added some additional config for setting bind
address and port.
Added management of /etc/mysql/my.cnf
Documented a dependency on create_resources 0.0.1
The mysql client package is different on CentOS. This commit adds
a parameter for the mysql client package and defaults to a variable
in the mysql::params class.
- previously setting the root password failed on
Debian b/c a root password was already set
during package installation
- Debian already installs mysql with a
maintainance user capable of performing any
required database actions.
- this patch splits setting of root password to
be redhat specific.
- as a consequence, users will not be able to
specify a root password on Debian (which
needs to be opened as a seperate ticket)
- updated mysql::ruby to use params value for
package_name
- updated server to use params value for service
and package
- clarified some param names to make them more
consistent