-
Notifications
You must be signed in to change notification settings - Fork 3
/
mariadb.sls
39 lines (39 loc) · 878 Bytes
/
mariadb.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
mariadb_package:
pkg.installed:
- pkgs:
- mariadb
- mariadb-server
- mariadb-libs
mariadb_config:
file.managed:
- name: /etc/my.cnf.d/server.cnf
- makedirs: True
- contents: |
[mysqld]
bind-address=0.0.0.0
service.running:
- name: mariadb.service
- enable: True
- watch:
- file: /etc/my.cnf.d/server.cnf
mariadb_firewall:
firewalld.present:
- name: public
- services:
- mysql
- prune_services: False
mariadb_salt_minion_conf:
file.append:
- name: /etc/salt/minion
- text: |
mysql.host: 'localhost'
mysql.port: 3306
mysql.user: 'root'
mysql.pass: ''
mysql.db: 'mysql'
mysql.unix_socket: '/var/lib/mysql/mysql.sock'
mysql.charset: 'utf8'
pkg.installed:
- pkgs:
- MySQL-python
- python2-PyMySQL.noarch