summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDon Brewer <dbrewer@dbrewer-host.usersys.redhat.com>2008-04-09 09:22:48 -0400
committerBrenton Leanhardt <bleanhar@redhat.com>2008-04-15 10:37:38 -0400
commit1bdc1f426185f05beb573eb7ca63d404d849d753 (patch)
tree175ae51b1d692b74b4d34a16a9545aa03be0e5e9 /templates
parent28544868b29c412418436e9924f301ac210c6236 (diff)
downloadpuppet-mysql-1bdc1f426185f05beb573eb7ca63d404d849d753.tar.gz
puppet-mysql-1bdc1f426185f05beb573eb7ca63d404d849d753.tar.xz
puppet-mysql-1bdc1f426185f05beb573eb7ca63d404d849d753.zip
added server_id and master_ip factors
Diffstat (limited to 'templates')
-rw-r--r--templates/gather_master_data.bash.erb8
-rw-r--r--templates/my.cnf.erb2
2 files changed, 5 insertions, 5 deletions
diff --git a/templates/gather_master_data.bash.erb b/templates/gather_master_data.bash.erb
index c9d3804..53cf2cf 100644
--- a/templates/gather_master_data.bash.erb
+++ b/templates/gather_master_data.bash.erb
@@ -2,20 +2,20 @@
PATH=$PATH
-logname=$(mysql -u replication --host=<%= master_host_ip %> --password=password --execute="show master status" | grep mysqllog | awk '{ print $1 }')
+logname=$(mysql -u replication --host=<%= mysql_master_ip_address %> --password=password --execute="show master status" | grep mysqllog | awk '{ print $1 }')
export logname
-position=$(mysql -u replication --host=<%= master_host_ip %> --password=password --execute="show master status" | grep mysqllog | awk '{ print $2 }')
+position=$(mysql -u replication --host=<%= mysql_master_ip_address %> --password=password --execute="show master status" | grep mysqllog | awk '{ print $2 }')
export position
rm /var/lib/mysql/set_master_repl_data.sql
-export master_host_ip=<%= master_host_ip %>
+export mysql_master_ip_address=<%= mysql_master_ip_address %>
#Build MySQL Master Data Script
#
echo CHANGE MASTER TO >> /var/lib/mysql/set_master_repl_data.sql
-echo MASTER_HOST=\'$master_host_ip\', >> /var/lib/mysql/set_master_repl_data.sql
+echo MASTER_HOST=\'$mysql_master_ip_address\', >> /var/lib/mysql/set_master_repl_data.sql
echo MASTER_USER=\'replication\', >> /var/lib/mysql/set_master_repl_data.sql
echo MASTER_PASSWORD=\'password\', >> /var/lib/mysql/set_master_repl_data.sql
echo MASTER_LOG_FILE=\'$logname\', >> /var/lib/mysql/set_master_repl_data.sql
diff --git a/templates/my.cnf.erb b/templates/my.cnf.erb
index 4013650..1c009fa 100644
--- a/templates/my.cnf.erb
+++ b/templates/my.cnf.erb
@@ -78,7 +78,7 @@ innodb_file_per_table
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
-server-id = <%= server_id %>
+server-id = <%= mysql_server_id %>
# Replication Slave (comment out master section to use this)
#