diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a52d50a7..57b92e39 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -142,7 +142,7 @@ default-ubuntu-1604-master-py3: {extends: '.test_instance'} # default-centos-7-master-py3: {extends: '.test_instance'} # default-fedora-33-master-py3: {extends: '.test_instance'} default-fedora-32-master-py3: {extends: '.test_instance'} -# default-opensuse-leap-152-master-py3: {extends: '.test_instance'} +default-opensuse-leap-152-master-py3: {extends: '.test_instance'} # default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance'} # default-amazonlinux-2-master-py3: {extends: '.test_instance'} # default-oraclelinux-8-master-py3: {extends: '.test_instance'} diff --git a/test/integration/default/controls/config_spec.rb b/test/integration/default/controls/config_spec.rb index d045163d..7b43ab05 100644 --- a/test/integration/default/controls/config_spec.rb +++ b/test/integration/default/controls/config_spec.rb @@ -45,6 +45,8 @@ setting_dbsocket = '/var/run/mysqld/mysqld.sock' when 'fedora' server_file_group = 'zabbixsrv' + when 'suse' + setting_dbsocket = '/run/mysql/mysql.sock' end # TODO: Conditional content to consider for inclusion below diff --git a/zabbix/agent/repo.sls b/zabbix/agent/repo.sls index e621fa83..b4f21740 100644 --- a/zabbix/agent/repo.sls +++ b/zabbix/agent/repo.sls @@ -12,7 +12,7 @@ include: # Here we just add a requisite declaration to ensure correct order extend: zabbix_agent_repo: - {% if salt['grains.get']('os_family') == 'Debian' -%} + {% if salt['grains.get']('os_family') in ['Debian', 'Suse'] -%} pkgrepo: - require_in: - pkg: zabbix-agent diff --git a/zabbix/frontend/repo.sls b/zabbix/frontend/repo.sls index 89693032..2df15c02 100644 --- a/zabbix/frontend/repo.sls +++ b/zabbix/frontend/repo.sls @@ -12,7 +12,7 @@ include: # Here we just add a requisite declaration to ensure correct order extend: zabbix_frontend_repo: - {% if salt['grains.get']('os_family') == 'Debian' -%} + {% if salt['grains.get']('os_family') in ['Debian', 'Suse'] -%} pkgrepo: - require_in: - pkg: zabbix-frontend-php diff --git a/zabbix/osfamilymap.yaml b/zabbix/osfamilymap.yaml index 039408ca..d4a34396 100644 --- a/zabbix/osfamilymap.yaml +++ b/zabbix/osfamilymap.yaml @@ -124,6 +124,52 @@ RedHat: pkgs: - MySQL-python +Suse: + version_repo: 5.0 + user: zabbix + group: zabbix + shell: /sbin/nologin + agent: + pkgs: + - zabbix-agent + service: zabbix-agent + config: /etc/zabbix/zabbix_agentd.conf + pidfile: /run/zabbix/zabbix_agentd.pid + logfile: /var/log/zabbix/zabbix_agentd.log + includes: + - /etc/zabbix/zabbix_agentd.d/*.conf + server: + pkgs: + - zabbix-server-mysql + service: zabbix-server + config: /etc/zabbix/zabbix_server.conf + dbsocket: /run/mysql/mysql.sock + pidfile: /run/zabbix/zabbix_server.pid + logfile: /var/log/zabbix/zabbix_server.log + snmptrapperfile: /var/log/snmptrap/snmptrap.log + fpinglocation: /usr/sbin/fping + fping6location: /usr/sbin/fping + frontend: + pkgs: + - zabbix-web-mysql + config: /etc/zabbix/web/zabbix.conf.php + proxy: + pkgs: + - zabbix-proxy-sqlite3 + service: zabbix-proxy + config: /etc/zabbix/zabbix_proxy.conf + dbname: /var/lib/zabbix/zabbix_proxy.db + pidfile: /run/zabbix/zabbix_proxy.pid + logfile: /var/log/zabbix/zabbix_proxy.log + mysql: + pkgs: + - MySQL-python + pgsql: + pkgs: + - postgresql + sql_file: /usr/share/doc/packages/zabbix-server-pgsql/create.sql.gz + + FreeBSD: version_repo: 2.2 user: zabbix diff --git a/zabbix/osfingermap.yaml b/zabbix/osfingermap.yaml index 090e844b..15bba58e 100644 --- a/zabbix/osfingermap.yaml +++ b/zabbix/osfingermap.yaml @@ -34,6 +34,8 @@ Amazon Linux AMI-2018: {} # os: SUSE Leap-15: {} +SLES-15: {} +SLES-12: {} # os: FreeBSD FreeBSD-12: {} diff --git a/zabbix/proxy/repo.sls b/zabbix/proxy/repo.sls index db0db3c2..ab6c29d9 100644 --- a/zabbix/proxy/repo.sls +++ b/zabbix/proxy/repo.sls @@ -12,7 +12,7 @@ include: # Here we just add a requisite declaration to ensure correct order extend: zabbix_proxy_repo: - {% if salt['grains.get']('os_family') == 'Debian' -%} + {% if salt['grains.get']('os_family') in ['Debian', 'Suse'] -%} pkgrepo: - require_in: - pkg: zabbix-proxy diff --git a/zabbix/repo.sls b/zabbix/repo.sls index 7c5eeef2..26b0f009 100644 --- a/zabbix/repo.sls +++ b/zabbix/repo.sls @@ -53,6 +53,16 @@ - gpgcheck: 1 - gpgkey: https://repo.zabbix.com/RPM-GPG-KEY-ZABBIX-79EA5ED4 +{%- elif salt['grains.get']('os_family') == 'Suse' %} +{{ id_prefix }}_repo: + pkgrepo.managed: + - name: zabbix + - humanname: "Zabbix Official Repository" + - baseurl: https://repo.zabbix.com/zabbix/{{ zabbix.version_repo }}/sles/{{ grains['osmajorrelease'] }}/x86_64/ + - gpgcheck: 1 + - gpgkey: https://repo.zabbix.com/zabbix/{{ zabbix.version_repo }}/sles/{{ grains['osmajorrelease'] }}/x86_64/repodata/repomd.xml.key + - gpgautoimport: True + {%- else %} {{ id_prefix }}_repo: {} {%- endif %} diff --git a/zabbix/server/repo.sls b/zabbix/server/repo.sls index ac34e48b..5fb4d1c4 100644 --- a/zabbix/server/repo.sls +++ b/zabbix/server/repo.sls @@ -12,7 +12,7 @@ include: # Here we just add a requisite declaration to ensure correct order extend: zabbix_server_repo: - {% if salt['grains.get']('os_family') == 'Debian' -%} + {% if salt['grains.get']('os_family') in ['Debian', 'Suse'] -%} pkgrepo: - require_in: - pkg: zabbix-server