Page MenuHomeDevCentral

D2986.diff
No OneTemporary

D2986.diff

diff --git a/roles/dbserver-mysql/mysql-server/cnf.sls b/roles/dbserver-mysql/mysql-server/cnf.sls
--- a/roles/dbserver-mysql/mysql-server/cnf.sls
+++ b/roles/dbserver-mysql/mysql-server/cnf.sls
@@ -9,6 +9,7 @@
{% from "map.jinja" import dirs with context %}
{% set use_zfs = salt['node.has']('zfs:pool') %}
+{% set is_devserver = salt['node.has_role']('devserver') %}
# -------------------------------------------------------------
# Required directories
@@ -47,6 +48,12 @@
share: {{ dirs.share }}
use_zfs: {{ use_zfs }}
+ {% if is_devserver %}
+ listen_ip: 127.0.0.1
+ {% else %}
+ listen_ip: 0.0.0.0
+ {% endif %}
+
{{ dirs.etc }}/mysql/stopwords.txt:
file.managed:
- source: salt://roles/dbserver-mysql/mysql-server/files/stopwords.txt
diff --git a/roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf b/roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf
--- a/roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf
+++ b/roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf
@@ -35,7 +35,7 @@
datadir = /var/db/mysql
lc-messages-dir = {{ share }}/mysql
-bind-address = 127.0.0.1
+bind-address = {{ listen_ip }}
socket = /var/run/mysql/mysqld.sock
port = 3306

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 04:19 (4 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2257190
Default Alt Text
D2986.diff (1 KB)

Event Timeline