A lot of changes based on dry run results
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
apt: name=python-mysqldb state=installed
|
||||
|
||||
- name: Replace config file
|
||||
template: src=my.cnf.j2 dest=/etc/mysql/my.cnf
|
||||
template: src=../roles/db/templates/my.cnf.j2 dest=/etc/mysql/my.cnf
|
||||
|
||||
- name: Stop mysql service
|
||||
service: name=mysql state=stop
|
||||
service: name=mysql state=stopped
|
||||
|
||||
|
||||
@@ -2,21 +2,22 @@
|
||||
# This starts the galera cluster
|
||||
|
||||
# Check if mysql is running
|
||||
- name: bootstrap by starting mysql with gcom://
|
||||
action: shell /etc/init.d/mysql start --wsrep-cluster-address="gcomm://"
|
||||
only_if: ${is_mysql_running.rc} > 0
|
||||
- name: is mysql running?
|
||||
action: shell service mysql status
|
||||
register: is_mysql_running
|
||||
ignore_errors: true
|
||||
|
||||
- name: bootstrap by starting mysql with new cluster
|
||||
action: shell service mysql start --wsrep-new-cluster
|
||||
|
||||
- name: Create wrestlingtourney database
|
||||
action: shell mysql -e "CREATE DATABASE wrestlingtourney;"
|
||||
|
||||
- name: set mysql root password
|
||||
action: shell mysql -e "UPDATE mysql.user SET password=PASSWORD('$root_mysql_password') where user='root'; FLUSH PRIVILEGES;"
|
||||
only_if: $(is_mysql_running.rc} > 0
|
||||
|
||||
- name: Set up haproxy_check user
|
||||
action: shell mysql -u root -p -e "INSERT INTO mysql.user (Host,User) values ('%','haproxy_check'); FLUSH PRIVILEGES;"
|
||||
only_if: $(is_mysql_running.rc} > 0
|
||||
|
||||
- name: Set up user for wrestlingtourney
|
||||
action: shell mysql -u root -p -e "CREATE USER 'heroku_jcw'@'%' IDENTIFIED BY '($heroku_jcw_password)';GRANT ALL PRIVILEGES ON wrestlingtourney.* TO 'heroku_jcw'@'%'; FLUSH PRIVILEGES;"
|
||||
only_if: $(is_mysql_running.rc} > 0
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
# This starts the mysql service
|
||||
|
||||
- name: Start mysql service
|
||||
service: name=mysql state=start
|
||||
service: name=mysql state=started
|
||||
|
||||
|
||||
Reference in New Issue
Block a user