From b99a74198f03db5ac9e1836acf3b4d51861044fd Mon Sep 17 00:00:00 2001 From: Sandy Walsh Date: Wed, 7 Jan 2015 11:10:31 -0800 Subject: [PATCH] my.cnf was going to wrong location. Got schooled on the difference between .my.cnf and my.cnf. This should be correct now. Change-Id: I5f23ae5dc9e824153fb9e85a11e09e422ed1e0f2 --- ansible/roles/stv3-db/handlers/main.yaml | 3 +++ ansible/roles/stv3-db/tasks/main.yaml | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 ansible/roles/stv3-db/handlers/main.yaml diff --git a/ansible/roles/stv3-db/handlers/main.yaml b/ansible/roles/stv3-db/handlers/main.yaml new file mode 100644 index 0000000..3c2d961 --- /dev/null +++ b/ansible/roles/stv3-db/handlers/main.yaml @@ -0,0 +1,3 @@ +--- + - name: restart_mysql + action: service name=mysql state=restarted diff --git a/ansible/roles/stv3-db/tasks/main.yaml b/ansible/roles/stv3-db/tasks/main.yaml index c70379f..f70f861 100644 --- a/ansible/roles/stv3-db/tasks/main.yaml +++ b/ansible/roles/stv3-db/tasks/main.yaml @@ -16,7 +16,9 @@ ignore_errors: yes - name: copy .my.cnf file with root password credentials - template: src=my.cnf.j2 dest=/root/.my.cnf owner=root mode=0600 + template: src=my.cnf.j2 dest=/etc/mysql/my.cnf owner=root mode=0600 + notify: + - restart_mysql - mysql_db: name=winchester state=present login_user=root login_password={{ root_db_password }}