From 98b054fcf6a922697583771e707719f867bc25fe Mon Sep 17 00:00:00 2001 From: root <root@saltmaster03.core.irknet.lan> Date: Wed, 11 Feb 2015 02:21:31 +0000 Subject: [PATCH] Official oracle mysql repo for mysql-server creates file /usr/my.cnf That overrides default /etc/mysql/my.cnf parameters Now if this file exists it bacame managed and empty --- mysql/files/usr-my.cnf | 7 +++++++ mysql/server.sls | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 mysql/files/usr-my.cnf diff --git a/mysql/files/usr-my.cnf b/mysql/files/usr-my.cnf new file mode 100644 index 0000000..2a18dd3 --- /dev/null +++ b/mysql/files/usr-my.cnf @@ -0,0 +1,7 @@ +# DO NOT CHANGE THIS FILE! +# This config is generated by SALTSTACK +# and all change will be overrided on next salt call +# +# this file was created by mysql-server package +# and replaced with saltstack +# to prevent default my.cnf parameters overriding diff --git a/mysql/server.sls b/mysql/server.sls index 4dcf1dc..a89065e 100644 --- a/mysql/server.sls +++ b/mysql/server.sls @@ -78,3 +78,14 @@ mysql_config: - group: root - mode: 644 {% endif %} + +# official oracle mysql repo +# creates this file, that rewrites /etc/mysql/my.cnf setting +# so, make it empty +mysql_additional_config: + file.managed: + - name: /usr/my.cnf + - source: salt://mysql/files/usr-my.cnf + - create: False + - watch_in: + - service: mysqld -- GitLab