Skip to content

Commit 70271b2

Browse files
authored
Merge pull request #227 from almumontiel/umd4_mariadb
mysql server: Allow daemon name to be configured
2 parents 23ae3c3 + b81295f commit 70271b2

File tree

1 file changed

+19
-47
lines changed

1 file changed

+19
-47
lines changed

features/mysql/server.pan

+19-47
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,24 @@
1-
21
unique template features/mysql/server;
32

4-
# Include RPMs for MySQL server
5-
'/software/packages/{mariadb-server}' = nlist();
6-
7-
# ----------------------------------------------------------------------------
8-
# chkconfig
9-
# ----------------------------------------------------------------------------
10-
include { 'components/chkconfig/config' };
3+
include 'components/chkconfig/config';
4+
include 'components/etcservices/config';
115

6+
# Include RPMs for MySQL server
7+
'/software/packages' = pkg_repl('mariadb-server');
128

13-
# ----------------------------------------------------------------------------
149
# Enable and start MySQL service
15-
# ----------------------------------------------------------------------------
16-
"/software/components/chkconfig/service/mariadbd/on" = "";
17-
"/software/components/chkconfig/service/mariadbd/startstop" = true;
18-
19-
20-
# ----------------------------------------------------------------------------
21-
# iptables
22-
# ----------------------------------------------------------------------------
23-
#include { 'components/iptables/config' };
24-
25-
# Inbound port(s).
26-
# Port 3306. Probably should limit to localhost traffic for most services.
27-
28-
# Outbound port(s).
29-
30-
31-
# ----------------------------------------------------------------------------
32-
# etcservices
33-
# ----------------------------------------------------------------------------
34-
include { 'components/etcservices/config' };
35-
36-
"/software/components/etcservices/entries" =
37-
push("mariadb 3306/tcp");
38-
"/software/components/etcservices/entries" =
39-
push("mariadb 3306/udp");
40-
41-
42-
# ----------------------------------------------------------------------------
43-
# cron
44-
# ----------------------------------------------------------------------------
45-
#include { 'components/cron/config' };
46-
47-
48-
# ----------------------------------------------------------------------------
49-
# altlogrotate
50-
# ----------------------------------------------------------------------------
51-
#include { 'components/altlogrotate/config' };
52-
10+
variable DAEMON_MYSQL ?= "mariadb";
11+
12+
"/software/components/chkconfig/service" ?= dict();
13+
"/software/components/chkconfig/service" = merge(SELF, dict(
14+
DAEMON_MYSQL, dict(
15+
'on', '',
16+
'startstop', true,
17+
),
18+
));
19+
20+
"/software/components/etcservices/entries" ?= list();
21+
"/software/components/etcservices/entries" = merge(SELF, list(
22+
"mariadb 3306/tcp",
23+
"mariadb 3306/udp",
24+
));

0 commit comments

Comments
 (0)