Skip to content
Snippets Groups Projects
Commit ab248f49 authored by Jupiter Hu's avatar Jupiter Hu
Browse files

change mysql config file to glable fixed name

parent 0b468168
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
......@@ -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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment