debian.cnf needs to be consistent across all db nodes
This commit is contained in:
@@ -24,6 +24,26 @@
|
||||
- name: Replace config file
|
||||
template: src=../roles/db/templates/my.cnf.j2 dest=/etc/mysql/my.cnf
|
||||
|
||||
- name: Create wrestlingtourney database
|
||||
action: shell mysql -e "CREATE DATABASE wrestlingtourney;"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Set up haproxy_check user
|
||||
action: shell mysql -e "CREATE USER 'haproxy_check'@'%'; FLUSH PRIVILEGES;"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Set up user for wrestlingtourney
|
||||
action: shell mysql -e "CREATE USER 'heroku_jcw'@'%' IDENTIFIED BY '{{ heroku_jcw_password }}';GRANT ALL PRIVILEGES ON wrestlingtourney.* TO 'heroku_jcw'@'%'; FLUSH PRIVILEGES;"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: set mysql root password
|
||||
action: shell mysql -e "UPDATE mysql.user SET password=PASSWORD('{{ root_mysql_password }}') where user='root'; FLUSH PRIVILEGES;"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Stop mysql service
|
||||
service: name=mysql state=stopped
|
||||
|
||||
- name: Replace debian config file
|
||||
template: src=../roles/db/templates/debian.cnf.j2 dest=/etc/mysql/debian.cnf
|
||||
|
||||
|
||||
|
||||
@@ -5,16 +5,4 @@
|
||||
- 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 up haproxy_check user
|
||||
action: shell mysql -e "CREATE USER 'haproxy_check'@'%'; FLUSH PRIVILEGES;"
|
||||
|
||||
- name: Set up user for wrestlingtourney
|
||||
action: shell mysql -e "CREATE USER 'heroku_jcw'@'%' IDENTIFIED BY '{{ heroku_jcw_password }}';GRANT ALL PRIVILEGES ON wrestlingtourney.* TO 'heroku_jcw'@'%'; FLUSH PRIVILEGES;"
|
||||
|
||||
- name: set mysql root password
|
||||
action: shell mysql -e "UPDATE mysql.user SET password=PASSWORD('{{ root_mysql_password }}') where user='root'; FLUSH PRIVILEGES;"
|
||||
|
||||
|
||||
|
||||
13
roles/db/templates/debian.cnf.j2
Normal file
13
roles/db/templates/debian.cnf.j2
Normal file
@@ -0,0 +1,13 @@
|
||||
# Automatically generated for Debian scripts. DO NOT TOUCH!
|
||||
[client]
|
||||
host = localhost
|
||||
user = root
|
||||
password = {{ root_mysql_password }}
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
[mysql_upgrade]
|
||||
host = localhost
|
||||
user = root
|
||||
password = {{ root_mysql_password }}
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
basedir = /usr
|
||||
|
||||
Reference in New Issue
Block a user