diff --git a/mysql/files/usr-my.cnf b/mysql/files/usr-my.cnf new file mode 100644 index 0000000000000000000000000000000000000000..2a18dd34196eb1c99996d15bd28ff82222fc7d5e --- /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 4dcf1dcb35c0cb507cfc547fe95ffdc4b48af21b..a89065e51f618a19874963c32d6649a8adfd035c 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