Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql
This commit is contained in:
commit
b07c67ec18
4 changed files with 59 additions and 59 deletions
|
@ -1,91 +1,91 @@
|
|||
[client]
|
||||
port = <%= port %>
|
||||
socket = <%= socket %>
|
||||
<% if character_set != 'UNSET' -%>
|
||||
default-character-set = <%= character_set %>
|
||||
<% if @character_set != 'UNSET' -%>
|
||||
default-character-set = <%= @character_set %>
|
||||
<% end %>
|
||||
[mysqld_safe]
|
||||
socket = <%= socket %>
|
||||
socket = <%= @socket %>
|
||||
nice = 0
|
||||
<% if log_error == 'syslog' -%>
|
||||
<% if @log_error == 'syslog' -%>
|
||||
syslog
|
||||
<% end -%>
|
||||
[mysqld]
|
||||
user = mysql
|
||||
pid-file = <%= pidfile %>
|
||||
socket = <%= socket %>
|
||||
port = <%= port %>
|
||||
basedir = <%= basedir %>
|
||||
datadir = <%= datadir %>
|
||||
pid-file = <%= @pidfile %>
|
||||
socket = <%= @socket %>
|
||||
port = <%= @port %>
|
||||
basedir = <%= @basedir %>
|
||||
datadir = <%= @datadir %>
|
||||
tmpdir = /tmp
|
||||
skip-external-locking
|
||||
|
||||
<% if bind_address -%>
|
||||
bind-address = <%= bind_address %>
|
||||
bind-address = <%= @bind_address %>
|
||||
<% end -%>
|
||||
key_buffer = <%= key_buffer %>
|
||||
max_allowed_packet = <%= max_allowed_packet %>
|
||||
thread_stack = <%= thread_stack %>
|
||||
thread_cache_size = <%= thread_cache_size %>
|
||||
myisam-recover = <%= myisam_recover %>
|
||||
query_cache_limit = <%= query_cache_limit %>
|
||||
query_cache_size = <%= query_cache_size %>
|
||||
expire_logs_days = <%= expire_logs_days %>
|
||||
max_binlog_size = <%= max_binlog_size %>
|
||||
key_buffer = <%= @key_buffer %>
|
||||
max_allowed_packet = <%= @max_allowed_packet %>
|
||||
thread_stack = <%= @thread_stack %>
|
||||
thread_cache_size = <%= @thread_cache_size %>
|
||||
myisam-recover = <%= @myisam_recover %>
|
||||
query_cache_limit = <%= @query_cache_limit %>
|
||||
query_cache_size = <%= @query_cache_size %>
|
||||
expire_logs_days = <%= @expire_logs_days %>
|
||||
max_binlog_size = <%= @max_binlog_size %>
|
||||
|
||||
<% if max_connections != 'UNSET' -%>
|
||||
max_connections = <%= max_connections %>
|
||||
<% if @max_connections != 'UNSET' -%>
|
||||
max_connections = <%= @max_connections %>
|
||||
<% end -%>
|
||||
<% if tmp_table_size != 'UNSET' -%>
|
||||
tmp_table_size = <%= tmp_table_size %>
|
||||
<% if @tmp_table_size != 'UNSET' -%>
|
||||
tmp_table_size = <%= @tmp_table_size %>
|
||||
<% end -%>
|
||||
<% if max_heap_table_size != 'UNSET' -%>
|
||||
max_heap_table_size = <%= max_heap_table_size %>
|
||||
<% if @max_heap_table_size != 'UNSET' -%>
|
||||
max_heap_table_size = <%= @max_heap_table_size %>
|
||||
<% end -%>
|
||||
<% if table_open_cache != 'UNSET' -%>
|
||||
table_open_cache = <%= table_open_cache %>
|
||||
<% if @table_open_cache != 'UNSET' -%>
|
||||
table_open_cache = <%= @table_open_cache %>
|
||||
<% end -%>
|
||||
<% if long_query_time != 'UNSET' -%>
|
||||
long_query_time = <%= long_query_time %>
|
||||
<% if @long_query_time != 'UNSET' -%>
|
||||
long_query_time = <%= @long_query_time %>
|
||||
<% end -%>
|
||||
<% if server_id != 'UNSET' -%>
|
||||
server-id = <%= server_id %>
|
||||
<% if @server_id != 'UNSET' -%>
|
||||
server-id = <%= @server_id %>
|
||||
<% end -%>
|
||||
<% if sql_log_bin != 'UNSET' -%>
|
||||
sql_log_bin = <%= sql_log_bin %>
|
||||
<% if @sql_log_bin != 'UNSET' -%>
|
||||
sql_log_bin = <%= @sql_log_bin %>
|
||||
<% end -%>
|
||||
<% if log_bin != 'UNSET' -%>
|
||||
log-bin = <%= log_bin %>
|
||||
<% if @log_bin != 'UNSET' -%>
|
||||
log-bin = <%= @log_bin %>
|
||||
<% end -%>
|
||||
<% if binlog_do_db != 'UNSET' -%>
|
||||
binlog-do-db = <%= binlog_do_db %>
|
||||
<% if @binlog_do_db != 'UNSET' -%>
|
||||
binlog-do-db = <%= @binlog_do_db %>
|
||||
<% end -%>
|
||||
<% if log_bin_trust_function_creators != 'UNSET' -%>
|
||||
log_bin_trust_function_creators = <%= log_bin_trust_function_creators %>
|
||||
<% if @log_bin_trust_function_creators != 'UNSET' -%>
|
||||
log_bin_trust_function_creators = <%= @log_bin_trust_function_creators %>
|
||||
<% end -%>
|
||||
<% if replicate_ignore_table != 'UNSET' -%>
|
||||
replicate-ignore-table = <%= replicate_ignore_table %>
|
||||
<% if @replicate_ignore_table != 'UNSET' -%>
|
||||
replicate-ignore-table = <%= @replicate_ignore_table %>
|
||||
<% end -%>
|
||||
<% if replicate_wild_do_table != 'UNSET' -%>
|
||||
replicate-wild-do-table = <%= replicate_wild_do_table %>
|
||||
<% if @replicate_wild_do_table != 'UNSET' -%>
|
||||
replicate-wild-do-table = <%= @replicate_wild_do_table %>
|
||||
<% end -%>
|
||||
<% if replicate_wild_ignore_table != 'UNSET' -%>
|
||||
replicate-wild-ignore-table = <%= replicate_wild_ignore_table %>
|
||||
<% if @replicate_wild_ignore_table != 'UNSET' -%>
|
||||
replicate-wild-ignore-table = <%= @replicate_wild_ignore_table %>
|
||||
<% end -%>
|
||||
|
||||
<% if log_error != 'syslog' -%>
|
||||
log_error = <%= log_error %>
|
||||
<% end -%>
|
||||
<% if default_engine != 'UNSET' %>
|
||||
default-storage-engine = <%= default_engine %>
|
||||
default-storage-engine = <%= @default_engine %>
|
||||
<% end -%>
|
||||
<% if character_set != 'UNSET' -%>
|
||||
character-set-server = <%= character_set %>
|
||||
<% if @character_set != 'UNSET' -%>
|
||||
character-set-server = <%= @character_set %>
|
||||
<% end -%>
|
||||
<% if ssl == true %>
|
||||
ssl-ca = <%= ssl_ca %>
|
||||
ssl-cert = <%= ssl_cert %>
|
||||
ssl-key = <%= ssl_key %>
|
||||
<% if @ssl == true %>
|
||||
ssl-ca = <%= @ssl_ca %>
|
||||
ssl-cert = <%= @ssl_cert %>
|
||||
ssl-key = <%= @ssl_key %>
|
||||
<% end -%>
|
||||
|
||||
[mysqldump]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[client]
|
||||
user=root
|
||||
host=localhost
|
||||
<% unless root_password == 'UNSET' -%>
|
||||
password=<%= root_password %>
|
||||
<% unless @root_password == 'UNSET' -%>
|
||||
password=<%= @root_password %>
|
||||
<% end -%>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
### MANAGED BY PUPPET ###
|
||||
<% settings.sort.each do |section, content| -%>
|
||||
<% @settings.sort.each do |section, content| -%>
|
||||
[<%= section %>]
|
||||
<% content.sort.each do |key, values| -%>
|
||||
<% [values].flatten.sort.each do |value| -%>
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
#
|
||||
##### START CONFIG ###################################################
|
||||
|
||||
USER=<%= backupuser %>
|
||||
PASS=<%= backuppassword %>
|
||||
DIR=<%= backupdir %>
|
||||
USER=<%= @backupuser %>
|
||||
PASS=<%= @backuppassword %>
|
||||
DIR=<%= @backupdir %>
|
||||
|
||||
##### STOP CONFIG ####################################################
|
||||
PATH=/usr/bin:/usr/sbin:/bin:/sbin
|
||||
|
||||
find $DIR -mtime +30 -exec rm -f {} \;
|
||||
mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \
|
||||
--all-databases <% if backupcompress %>| bzcat -zc <% end %>> ${DIR}/mysql_backup_`date +%Y%m%d-%H%M%S`.sql<% if backupcompress %>.bz2<% end %>
|
||||
--all-databases <% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/mysql_backup_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %>
|
||||
|
||||
|
|
Loading…
Reference in a new issue