|
1 | 1 | # Class: mysql::config
|
2 | 2 | #
|
3 | 3 | # Parameters:
|
4 |
| -# [*bind_address*] - address to bind service. |
5 |
| -# [*config_file*] - my.cnf configuration file path. |
6 |
| -# [*datadir*] - path to datadir. |
7 |
| -# [*tmpdir*] - path to tmpdir. |
8 |
| -# [*default_engine] - configure a default table engine |
9 |
| -# [*etc_root_password*] - whether to save /etc/my.cnf. |
10 |
| -# [*log_error] - path to mysql error log |
11 |
| -# [*manage_config_file*] - if the config file should be managed (default: true) |
12 |
| -# [*max_allowed_packet*] - Maximum network packet size mysqld will accept |
13 |
| -# [*old_root_password*] - previous root user password, |
14 |
| -# [*port*] - port to bind service. |
15 |
| -# [*restart] - whether to restart mysqld (true/false) |
16 |
| -# [*root_group] - use specified group for root-owned files |
17 |
| -# [*root_password*] - root user password. |
18 |
| -# [*service_name*] - mysql service name. |
19 |
| -# [*socket*] - mysql socket. |
20 |
| -# [*ssl] - enable ssl |
21 |
| -# [*ssl_ca] - path to ssl-ca |
22 |
| -# [*ssl_cert] - path to ssl-cert |
23 |
| -# [*ssl_key] - path to ssl-key |
24 | 4 | #
|
| 5 | +# [*root_password*] - root user password. |
| 6 | +# [*old_root_password*] - previous root user password, |
| 7 | +# [*bind_address*] - address to bind service. |
| 8 | +# [*port*] - port to bind service. |
| 9 | +# [*etc_root_password*] - whether to save /etc/my.cnf. |
| 10 | +# [*service_name*] - mysql service name. |
| 11 | +# [*config_file*] - my.cnf configuration file path. |
| 12 | +# [*socket*] - mysql socket. |
| 13 | +# [*datadir*] - path to datadir. |
| 14 | +# [*ssl] - enable ssl |
| 15 | +# [*ssl_ca] - path to ssl-ca |
| 16 | +# [*ssl_cert] - path to ssl-cert |
| 17 | +# [*ssl_key] - path to ssl-key |
| 18 | +# [*log_error] - path to mysql error log |
| 19 | +# [*default_engine] - configure a default table engine |
| 20 | +# [*root_group] - use specified group for root-owned files |
| 21 | +# [*restart] - whether to restart mysqld (true/false) |
| 22 | +# [*character_set] - You can change the default server and |
| 23 | +# client character set |
| 24 | +# [*key_buffer] - Index blocks for MyISAM tables are buffered and |
| 25 | +# are shared by all threads. key_buffer_size is the size of the buffer used |
| 26 | +# for index blocks. |
| 27 | +# [*max_allowed_packet] - The maximum size of one packet or any |
| 28 | +# generated/intermediate string, or any parameter sent by the |
| 29 | +# mysql_stmt_send_long_data() C API function. |
| 30 | +# [*thread_stack] - The stack size for each thread. |
| 31 | +# [*thread_cache_size] - How many threads server should cache for reuse. |
| 32 | +# [*myisam-recover] - Set the MyISAM storage engine recovery mode. |
| 33 | +# [*query_cache_limit] - Do not cache results that are larger than this |
| 34 | +# number of bytes. |
| 35 | +# [*query_cache_size] - The amount of memory allocated for caching query |
| 36 | +# results. |
| 37 | +# [*max_connections] - The maximum permitted number of simultaneous |
| 38 | +# client connections. |
| 39 | +# [*tmp_table_size] - The maximum size of internal in-memory temporary |
| 40 | +# tables. |
| 41 | +# [*max_heap_table_size] - This variable sets the maximum size to which |
| 42 | +# user-created MEMORY tables are permitted to grow. |
| 43 | +# [*table_open_cache] - The number of open tables for all threads. |
| 44 | +# [*long_query_time] - If a query takes longer than this many seconds, |
| 45 | +# the server increments the Slow_queries status variable. |
| 46 | +# [*server_id] - The server ID, used in replication to give each |
| 47 | +# master and slave a unique identity. |
| 48 | +# [*sql_log_bin] - This variable controls whether logging to the |
| 49 | +# binary log is done. The default value is 1. |
| 50 | +# [*log_bin] - Enable binary logging. The server logs all |
| 51 | +# statements that change data to the binary log, which is used for backup |
| 52 | +# and replication. |
| 53 | +# [*max_binlog_size] - If a write to the binary log causes the current |
| 54 | +# log file size to exceed the value of this variable, the server rotates |
| 55 | +# the binary logs (closes the current file and opens the next one). |
| 56 | +# [*binlog_do_db] - This option affects binary logging in a manner |
| 57 | +# similar to the way that --replicate-do-db affects replication. |
| 58 | +# [*expire_logs_days] - The number of days for automatic binary log file |
| 59 | +# removal. |
| 60 | +# [*log_bin_trust_function_creators] - It controls whether stored function |
| 61 | +# creators can be trusted not to create stored functions that will cause |
| 62 | +# unsafe events to be written to the binary log. |
| 63 | +# [*replicate_ignore_table] - Tells the slave SQL thread not to |
| 64 | +# replicate any statement that updates the specified table, even if any |
| 65 | +# other tables might be updated by the same statement. |
| 66 | +# [*replicate_wild_do_table] - Tells the slave thread to restrict |
| 67 | +# replication to statements where any of the updated tables match the |
| 68 | +# specified database and table name patterns. |
| 69 | +# [*replicate_wild_ignore_table] - Tells the slave thread not to |
| 70 | +# replicate a statement where any table matches the given wildcard pattern. |
25 | 71 | #
|
26 | 72 | # Actions:
|
27 | 73 | #
|
|
37 | 83 | # }
|
38 | 84 | #
|
39 | 85 | class mysql::config(
|
40 |
| - $bind_address = $mysql::bind_address, |
41 |
| - $config_file = $mysql::config_file, |
42 |
| - $datadir = $mysql::datadir, |
43 |
| - $tmpdir = $mysql::tmpdir, |
44 |
| - $default_engine = $mysql::default_engine, |
45 |
| - $etc_root_password = $mysql::etc_root_password, |
46 |
| - $manage_config_file = $mysql::manage_config_file, |
47 |
| - $max_allowed_packet = $mysql::max_allowed_packet, |
48 |
| - $log_error = $mysql::log_error, |
49 |
| - $pidfile = $mysql::pidfile, |
50 |
| - $port = $mysql::port, |
51 |
| - $purge_conf_dir = $mysql::purge_conf_dir, |
52 |
| - $max_connections = $mysql::max_connections, |
53 |
| - $restart = $mysql::restart, |
54 |
| - $root_group = $mysql::root_group, |
55 |
| - $root_password = $mysql::root_password, |
56 |
| - $old_root_password = $mysql::old_root_password, |
57 |
| - $service_name = $mysql::service_name, |
58 |
| - $socket = $mysql::socket, |
59 |
| - $ssl = $mysql::ssl, |
60 |
| - $ssl_ca = $mysql::ssl_ca, |
61 |
| - $ssl_cert = $mysql::ssl_cert, |
62 |
| - $ssl_key = $mysql::ssl_key |
| 86 | + $root_password = $mysql::root_password, |
| 87 | + $old_root_password = $mysql::old_root_password, |
| 88 | + $bind_address = $mysql::bind_address, |
| 89 | + $port = $mysql::port, |
| 90 | + $etc_root_password = $mysql::etc_root_password, |
| 91 | + $manage_config_file = $mysql::manage_config_file, |
| 92 | + $service_name = $mysql::service_name, |
| 93 | + $config_file = $mysql::config_file, |
| 94 | + $socket = $mysql::socket, |
| 95 | + $pidfile = $mysql::pidfile, |
| 96 | + $datadir = $mysql::datadir, |
| 97 | + $ssl = $mysql::ssl, |
| 98 | + $ssl_ca = $mysql::ssl_ca, |
| 99 | + $ssl_cert = $mysql::ssl_cert, |
| 100 | + $ssl_key = $mysql::ssl_key, |
| 101 | + $log_error = $mysql::log_error, |
| 102 | + $default_engine = $mysql::default_engine, |
| 103 | + $root_group = $mysql::root_group, |
| 104 | + $restart = $mysql::restart, |
| 105 | + $purge_conf_dir = $mysql::purge_conf_dir, |
| 106 | + $key_buffer = $mysql::key_buffer, |
| 107 | + $max_allowed_packet = $mysql::max_allowed_packet, |
| 108 | + $thread_stack = $mysql::thread_stack, |
| 109 | + $thread_cache_size = $mysql::thread_cache_size, |
| 110 | + $myisam_recover = $mysql::myisam_recover, |
| 111 | + $query_cache_limit = $mysql::query_cache_limit, |
| 112 | + $query_cache_size = $mysql::query_cache_size, |
| 113 | + $max_binlog_size = $mysql::max_binlog_size, |
| 114 | + $expire_logs_days = $mysql::expire_logs_days, |
| 115 | + $max_connections = $mysql::max_connections, |
| 116 | + $tmp_table_size = 'UNSET', |
| 117 | + $max_heap_table_size = 'UNSET', |
| 118 | + $table_open_cache = 'UNSET', |
| 119 | + $long_query_time = 'UNSET', |
| 120 | + $character_set = 'UNSET', |
| 121 | + $server_id = 'UNSET', |
| 122 | + $sql_log_bin = 'UNSET', |
| 123 | + $log_bin = 'UNSET', |
| 124 | + $binlog_do_db = 'UNSET', |
| 125 | + $log_bin_trust_function_creators = 'UNSET', |
| 126 | + $replicate_ignore_table = 'UNSET', |
| 127 | + $replicate_wild_do_table = 'UNSET', |
| 128 | + $replicate_wild_ignore_table = 'UNSET' |
63 | 129 | ) inherits mysql {
|
64 | 130 |
|
65 | 131 | File {
|
66 | 132 | owner => 'root',
|
67 | 133 | group => $root_group,
|
68 | 134 | mode => '0400',
|
69 |
| - notify => $restart ? { |
70 |
| - true => Exec['mysqld-restart'], |
| 135 | + notify => $restart ? { |
| 136 | + true => Exec['mysqld-restart'], |
71 | 137 | false => undef,
|
72 | 138 | },
|
73 | 139 | }
|
|
0 commit comments