debian.cnf needs to be consistent across all db nodes

This commit is contained in:
2016-02-16 09:48:51 -05:00
parent 18fcad80d9
commit bfae0a52a2
3 changed files with 33 additions and 12 deletions

View File

@@ -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