Commit graph

48 commits

Author SHA1 Message Date
Julien Pivotto
e30e0bc958 Re-Add the ability to set a empty string as option parameter
Prior to 136b1aa646 it was possible to
have an empty string as value of a my.cnf parameter, resulting in a line
with just the parameter name.

That commit re-enable that behavior that was removed by accident.
2016-01-08 14:00:31 +01:00
Thomas Mueller
5d732bda6c (maint) add statement "MANAGED BY PUPPET" to my.cnf config file template and remove unused my.conf.cnf.erb template 2014-11-05 10:13:39 +01:00
Chris Edester
fa968542e0 future parser converts explicit undef to empty string
With the future parser and puppet 4, explicit undef seems to be converted to blank string for erb templates
This change allows you to continue to omit config options in the main my.cnf
2014-09-15 13:10:17 -04:00
Lukas Bezdicka
26204437ef Prametrize !includedir
Hardcoded path provided by puppet is now replaced by providing only the final directory as on
most systems includedir is provided by package and it's matter of user to provide it if he
wants to override it. This also allows disabling including at all.
2014-06-04 14:07:49 +02:00
Robin Gloster
e4d63f7dc6 fix mysql not starting if ssl is not disabled 2014-03-06 14:03:13 +01:00
Robin Gloster
abcea00dcb handle mysql compiled without ssl
mysql doesn't allow ssl=true/false in my.cnf if it hasn't been compiled
with ssl, therefor add a new parameter ssl-disable which makes sure the
template doesn't write anything with ssl to the config.
2014-02-28 21:42:41 +01:00
Jim Radford
56e81a38c8 Allow override_options to set an option to undef to completely remove it
allowing reverting to mysql's default value.

Note that previously a value of :undef would have led to a nonsensical
my.cnf file.
2014-01-23 17:34:27 -08:00
Jim Radford
136b1aa646 Allow options with values of false to override things that mysql default to true
instead of being elided, leaving the default.
2014-01-23 16:53:57 -08:00
Jim Radford
08e8477e96 Noop indent and cleanup the my.cnf template 2014-01-23 16:17:51 -08:00
Guillaume Coré
dae8018520 Support multiple lines of the same option
Some MySQL options need to be passed several times. For example :

  http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_replicate-do-db

  This is currently impossible with the override_options. This patch allows to
  pass array as value. Example :

    override_options => {
      'client' => {
        'password' => 'xxx',
      },
      'mysqld' => {
        'bind_address'    => '0.0.0.0',
        'replicate-do-db' => ['base1', 'base2', 'base3'],
      },
    }

  Which will be evaluated into :

    [client]
    password = xxx

    [mysqld]
    bind_address = 0.0.0.0
    replicate-do-db = base1
    replicate-do-db = base2
    replicate-do-db = base3
2013-12-18 16:00:12 -05:00
James Glenn
fc14afe4c0 Some options can not take a argument. Gets rid of the '= true' when an option is set to true. See Issues #338 and #363 2013-11-06 14:21:22 -06:00
Thomas Kenny
52083e6c6a Updated my.cnf template to support items with no values 2013-10-09 07:42:16 -07:00
Ashley Penney
b81f64c8ab Rework templates to rely on the new hash and become vastly less complex. 2013-09-13 13:14:48 -04:00
Ashley Penney
e3843ceb6f Refactor to use mysql::globals.
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.
2013-09-09 11:34:39 -04:00
Matthew Haughton
6bd91d04c1 Remove redundant my.cnf parameters
The following new `mysql` class replication parameters were added in 0.8.0, however the existing hard coded parameters were not removed from the my.conf.erb template:

- `expire_logs_days`
- `max_binlog_size`
2013-07-15 16:18:12 -04:00
Ashley Penney
b00a6758a2 Simplify a few things. 2013-07-11 19:42:41 -04:00
Daniel De Marco
e12eb0e19f add ft_min_word_len and ft_max_word_len config options 2013-07-04 21:33:53 -04:00
Lebedev Vadim
9d69afcae7 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql
Conflicts:
	manifests/config.pp
	spec/classes/mysql_config_spec.rb
2013-07-02 22:11:19 +04:00
Martin Hellmich
3089d3a59b add a maximum connection parameter and set the default to 1000
Conflicts:
	manifests/config.pp
	templates/my.cnf.erb
2013-06-28 10:15:58 +02:00
Lebedev Vadim
a42d5bea53 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql 2013-06-26 14:06:01 +04:00
Hunter Haugen
c459884dc9 Change tmpdir to @tmpdir 2013-06-25 15:06:07 -07:00
Niek Beernink
9dc1b946de make tmpdir configurable 2013-06-25 15:06:07 -07:00
Hunter Haugen
4b900ec44d Update template for #179 2013-06-25 15:03:12 -07:00
Hunter Haugen
a04038efb0 Merge pull request #179 from msmithgu/parameterize-max_allowed_packet
Parameterized max_allowed_packet my.conf config setting, because it is needed to setup puppet-dashboard.
2013-06-25 14:56:53 -07:00
Lebedev Vadim
6c81ea0d24 * Trying fix unit tests for Travis 2013-06-16 19:41:29 +04:00
Lebedev Vadim
b07c67ec18 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql 2013-06-10 16:36:41 +04:00
Gordon Franke
04fb83f456 fix puppet warning default_engine 2013-05-29 15:16:48 +03:00
Chris Rutter
6194354a7b use of variables w/ out a '@' has been deprecated, and as of 3.2.x Puppet warns about it 2013-05-24 10:01:52 -04:00
Mark Smith-Guerrero
242f6e5881 parameterized previously hardcoded max_allowed_packet config setting 2013-05-06 15:55:53 -04:00
Lebedev Vadim
5ea8e5f920 * Adding server_idparameter to mysql::config`
* Adding `sql_log_bin` parameter to `mysql::config`
* Adding `log_bin` parameter to `mysql::config`
* Adding `max_binlog_size` parameter to `mysql::config`
* Adding `binlog_do_db` parameter to `mysql::config`
* Adding `expire_logs_days` parameter to `mysql::config`
* Adding `log_bin_trust_function_creators` parameter to `mysql::config`
* Adding `replicate_ignore_table` parameter to `mysql::config`
* Adding `replicate_wild_do_table` parameter to `mysql::config`
* Adding `replicate_wild_ignore_table` parameter to `mysql::config`
* Adding `expire_logs_days`  parameter to `mysql::params`
* Adding `max_binlog_size` parameter to `mysql::params`
2013-04-08 19:23:24 +04:00
Lebedev Vadim
2a1b1e7962 * Adding key_buffer parameter to mysql::config
* Adding `thread_stack` parameter to `mysql::config`
* Adding `thread_cache_size` parameter to `mysql::config`
* Adding `myisam-recover` parameter to `mysql::config`
* Adding `query_cache_limit` parameter to `mysql::config`
* Adding `query_cache_size` parameter to `mysql::config`
* Adding `max_connections` parameter to `mysql::config`
* Adding `tmp_table_size` parameter to `mysql::config`
* Adding `table_open_cache` parameter to `mysql::config`
* Adding `long_query_time` parameter to `mysql::config`
* Updating mysql_config spec tests
* Fixing lint warnings
2013-04-08 00:20:36 +04:00
Lebedev Vadim
e3b6de2da2 Implement character_set. You can change the default server and
client character set
2013-04-04 14:02:58 +04:00
Steffen Zieger
2e0cbb47ba allow logging via syslog 2012-11-16 20:37:14 +01:00
Hunter Haugen
036b97870b Update bind_address conditional for false 2012-08-23 18:30:37 -07:00
Luis Munoz
80521e12b6 Add posiblity to UNSET bind-address 2012-08-23 18:20:35 -07:00
Eugene Kirpichov
6869b77541 Parameterized pidfile; critical for successful first restart 2012-08-21 18:32:34 -07:00
Dan Bode
211da13545 Revert "Merge pull request #90 from emonty/master"
This reverts commit 063d72493c, reversing
changes made to 9c10b3a6c3.
2012-08-15 18:03:37 -07:00
Monty Taylor
069dc48d38 Add parameterization changes from wikipedia. 2012-07-30 09:31:48 -05:00
William Van Hevelingen
05d7e23fe8 (#14330) Add support for FreeBSD
Note: ssl_ca, ssl_cert, and ssl_key do not have sane
defaults in FreeBSD. Setting ssl to true will require
setting the parameters mentioned above.
2012-05-30 19:12:25 -07:00
John Chilton
0f0928ae88 Allow specification of storage engine. 2012-05-15 12:37:03 -05:00
Derek Higgins
9ff99ba336 set platform dependent error logfile location 2012-04-12 00:06:35 +00:00
William Van Hevelingen
f7e0ea5893 (#13203) Add ssl support
This commit adds a ssl parameter to the mysql::config class.
Setting ssl to true adds the following parameters to the template.

   ssl_ca             - path to ssl-ca
   ssl_cert           - path to ssl-cert
   ssl_key            - path to ssl-key
2012-03-21 14:48:22 -07:00
William Van Hevelingen
f353fc6a2d (#13163) Datadir should be configurable
Previously datadir was hardcoded to /var/lib/mysql.
This commit makes datadir configurable for MySQL
installations with custom datadir paths.
2012-03-17 20:19:55 -07:00
Nan Liu
b1f90fd1d2 Major refactor of mysql module.
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.
2012-03-13 15:19:53 -07:00
Justin Ellison
663e97ca2f Use socket value from params class instead of hardcoding. 2012-02-28 10:34:19 -08:00
Dan Bode
a24881a682 Created config class and extended params.
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
2011-06-22 11:38:11 -07:00
Dan Bode
0b5cc21348 cleaned up style a little:
- 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
2011-05-26 18:11:24 -07:00
Dan Bode
d28f0e0327 adding first commit for mysql. 2011-05-24 23:22:43 -07:00