From ab248f49a2caccf63eeba72ade2990cc9b515116 Mon Sep 17 00:00:00 2001
From: CVL-GitHub <jupiter.hu@monash.edu>
Date: Wed, 12 Aug 2015 10:47:37 +1000
Subject: [PATCH] change mysql config file to glable fixed name

---
 roles/mysql/tasks/mysql_server.yml | 14 +-------------
 roles/mysql/vars/readme.txt        |  1 -
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/roles/mysql/tasks/mysql_server.yml b/roles/mysql/tasks/mysql_server.yml
index a226cd72..259ca380 100644
--- a/roles/mysql/tasks/mysql_server.yml
+++ b/roles/mysql/tasks/mysql_server.yml
@@ -40,7 +40,7 @@
   sudo: true
 
 - name: "Templating mysql configure file"
-  template: src="mysql.cnf.j2" dest=/etc/mysql/conf.d/{{ mysql_config_file_name }}.cnf owner=root group=root
+  template: src="mysql.cnf.j2" dest=/etc/mysql/conf.d/mysqld_safe_syslog.cnf owner=root group=root
   sudo: true
 
 - name: "Adding root"
@@ -61,23 +61,11 @@
   sudo: true
   when: ansible_os_family == "RedHat"
 
-- name: "Add my.cnf security"
-  lineinfile: dest=/etc/my.cnf line="{{ item }}" insertafter="symbolic-links=0"
-  with_items:
-    - 'log_warnings = 2'
-    - 'log_error = /var/log/mysql/error.log'
-  sudo: true
-  notify: Restart MySQL
-  when: ansible_os_family == "RedHat"
-
-
 - name: "Editing my.cnf"
   lineinfile: dest=/etc/my.cnf line="{{ item }}"
   with_items:
     - '[client]'
     - 'default-character-set = utf8'
-    - 'log_warnings = 2'
-    - 'log_error = /var/log/mysql/error.log'
   sudo: true
   notify: Restart MySQL
   when: ansible_os_family == "RedHat"
diff --git a/roles/mysql/vars/readme.txt b/roles/mysql/vars/readme.txt
index a17f539a..ae0e02b2 100644
--- a/roles/mysql/vars/readme.txt
+++ b/roles/mysql/vars/readme.txt
@@ -4,7 +4,6 @@ mysql_type: mysql_client | mysql_server
 mysql_user_db_name: "my_database" 
 mysql_user_name: "my_database" 
 mysql_user_host: "localhost"
-mysql_config_file_name: "mysql_config"
 mysql_root_password: "secret"
 mysql_user_password: "secret"
 
-- 
GitLab