Skip to content

Commit a8b7982

Browse files
authored
Merge pull request #146 from ghormoon/suse-support
Add suse support (with mysql defaults this time)
2 parents 2c67b11 + a245ec4 commit a8b7982

File tree

9 files changed

+65
-5
lines changed

9 files changed

+65
-5
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ default-ubuntu-1604-master-py3: {extends: '.test_instance'}
142142
# default-centos-7-master-py3: {extends: '.test_instance'}
143143
# default-fedora-33-master-py3: {extends: '.test_instance'}
144144
default-fedora-32-master-py3: {extends: '.test_instance'}
145-
# default-opensuse-leap-152-master-py3: {extends: '.test_instance'}
145+
default-opensuse-leap-152-master-py3: {extends: '.test_instance'}
146146
# default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance'}
147147
# default-amazonlinux-2-master-py3: {extends: '.test_instance'}
148148
# default-oraclelinux-8-master-py3: {extends: '.test_instance'}

test/integration/default/controls/config_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
setting_dbsocket = '/var/run/mysqld/mysqld.sock'
4646
when 'fedora'
4747
server_file_group = 'zabbixsrv'
48+
when 'suse'
49+
setting_dbsocket = '/run/mysql/mysql.sock'
4850
end
4951

5052
# TODO: Conditional content to consider for inclusion below

zabbix/agent/repo.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ include:
1212
# Here we just add a requisite declaration to ensure correct order
1313
extend:
1414
zabbix_agent_repo:
15-
{% if salt['grains.get']('os_family') == 'Debian' -%}
15+
{% if salt['grains.get']('os_family') in ['Debian', 'Suse'] -%}
1616
pkgrepo:
1717
- require_in:
1818
- pkg: zabbix-agent

zabbix/frontend/repo.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ include:
1212
# Here we just add a requisite declaration to ensure correct order
1313
extend:
1414
zabbix_frontend_repo:
15-
{% if salt['grains.get']('os_family') == 'Debian' -%}
15+
{% if salt['grains.get']('os_family') in ['Debian', 'Suse'] -%}
1616
pkgrepo:
1717
- require_in:
1818
- pkg: zabbix-frontend-php

zabbix/osfamilymap.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,52 @@ RedHat:
124124
pkgs:
125125
- MySQL-python
126126

127+
Suse:
128+
version_repo: 5.0
129+
user: zabbix
130+
group: zabbix
131+
shell: /sbin/nologin
132+
agent:
133+
pkgs:
134+
- zabbix-agent
135+
service: zabbix-agent
136+
config: /etc/zabbix/zabbix_agentd.conf
137+
pidfile: /run/zabbix/zabbix_agentd.pid
138+
logfile: /var/log/zabbix/zabbix_agentd.log
139+
includes:
140+
- /etc/zabbix/zabbix_agentd.d/*.conf
141+
server:
142+
pkgs:
143+
- zabbix-server-mysql
144+
service: zabbix-server
145+
config: /etc/zabbix/zabbix_server.conf
146+
dbsocket: /run/mysql/mysql.sock
147+
pidfile: /run/zabbix/zabbix_server.pid
148+
logfile: /var/log/zabbix/zabbix_server.log
149+
snmptrapperfile: /var/log/snmptrap/snmptrap.log
150+
fpinglocation: /usr/sbin/fping
151+
fping6location: /usr/sbin/fping
152+
frontend:
153+
pkgs:
154+
- zabbix-web-mysql
155+
config: /etc/zabbix/web/zabbix.conf.php
156+
proxy:
157+
pkgs:
158+
- zabbix-proxy-sqlite3
159+
service: zabbix-proxy
160+
config: /etc/zabbix/zabbix_proxy.conf
161+
dbname: /var/lib/zabbix/zabbix_proxy.db
162+
pidfile: /run/zabbix/zabbix_proxy.pid
163+
logfile: /var/log/zabbix/zabbix_proxy.log
164+
mysql:
165+
pkgs:
166+
- MySQL-python
167+
pgsql:
168+
pkgs:
169+
- postgresql
170+
sql_file: /usr/share/doc/packages/zabbix-server-pgsql/create.sql.gz
171+
172+
127173
FreeBSD:
128174
version_repo: 2.2
129175
user: zabbix

zabbix/osfingermap.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Amazon Linux AMI-2018: {}
3434

3535
# os: SUSE
3636
Leap-15: {}
37+
SLES-15: {}
38+
SLES-12: {}
3739

3840
# os: FreeBSD
3941
FreeBSD-12: {}

zabbix/proxy/repo.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ include:
1212
# Here we just add a requisite declaration to ensure correct order
1313
extend:
1414
zabbix_proxy_repo:
15-
{% if salt['grains.get']('os_family') == 'Debian' -%}
15+
{% if salt['grains.get']('os_family') in ['Debian', 'Suse'] -%}
1616
pkgrepo:
1717
- require_in:
1818
- pkg: zabbix-proxy

zabbix/repo.sls

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@
5353
- gpgcheck: 1
5454
- gpgkey: https://repo.zabbix.com/RPM-GPG-KEY-ZABBIX-79EA5ED4
5555
56+
{%- elif salt['grains.get']('os_family') == 'Suse' %}
57+
{{ id_prefix }}_repo:
58+
pkgrepo.managed:
59+
- name: zabbix
60+
- humanname: "Zabbix Official Repository"
61+
- baseurl: https://repo.zabbix.com/zabbix/{{ zabbix.version_repo }}/sles/{{ grains['osmajorrelease'] }}/x86_64/
62+
- gpgcheck: 1
63+
- gpgkey: https://repo.zabbix.com/zabbix/{{ zabbix.version_repo }}/sles/{{ grains['osmajorrelease'] }}/x86_64/repodata/repomd.xml.key
64+
- gpgautoimport: True
65+
5666
{%- else %}
5767
{{ id_prefix }}_repo: {}
5868
{%- endif %}

zabbix/server/repo.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ include:
1212
# Here we just add a requisite declaration to ensure correct order
1313
extend:
1414
zabbix_server_repo:
15-
{% if salt['grains.get']('os_family') == 'Debian' -%}
15+
{% if salt['grains.get']('os_family') in ['Debian', 'Suse'] -%}
1616
pkgrepo:
1717
- require_in:
1818
- pkg: zabbix-server

0 commit comments

Comments
 (0)