From 6c694cd8fa9bb0f811567ad7fce2e70b8ce87e7f Mon Sep 17 00:00:00 2001 From: jon4hz Date: Thu, 13 Jun 2024 03:09:20 +0200 Subject: [PATCH] feat: support zabbix installation on suse (#1194) --- .github/workflows/agent.yml | 1 + .github/workflows/javagateway.yml | 1 + .github/workflows/proxy.yml | 2 +- .github/workflows/repo.yml | 1 + .github/workflows/server.yml | 1 + .github/workflows/web.yml | 2 + changelogs/fragments/pr_1194.yml | 2 + docs/ZABBIX_AGENT_ROLE.md | 19 +++---- docs/ZABBIX_JAVAGATEWAY_ROLE.md | 19 +++---- docs/ZABBIX_PROXY_ROLE.md | 19 +++---- docs/ZABBIX_REPO_ROLE.md | 23 +++++---- docs/ZABBIX_SERVER_ROLE.md | 19 +++---- .../zabbix_agent_tests/common/molecule.yml | 3 +- .../common/playbooks/prepare.yml | 12 ++++- .../common/tests/common/test_agent.py | 10 ++-- .../molecule/agent2/tests/conftest.py | 7 +-- .../molecule/agent2autopsk/tests/conftest.py | 7 +-- .../molecule/autopsk/tests/conftest.py | 7 +-- .../molecule/default/tests/conftest.py | 9 ++-- molecule/zabbix_javagateway/molecule.yml | 3 +- molecule/zabbix_javagateway/prepare.yml | 17 +++++-- molecule/zabbix_proxy/molecule.yml | 3 +- molecule/zabbix_proxy/prepare.yml | 15 +++++- molecule/zabbix_repo/molecule.yml | 3 +- molecule/zabbix_repo/prepare.yml | 2 +- molecule/zabbix_repo/tests/test_default.py | 2 + molecule/zabbix_server/molecule.yml | 3 +- molecule/zabbix_server/prepare.yml | 11 +++++ molecule/zabbix_web/molecule.yml | 3 +- molecule/zabbix_web/prepare.yml | 30 ++++++++++-- molecule/zabbix_web/tests/test_default.py | 13 ++++- roles/zabbix_agent/tasks/Suse.yml | 49 +++++++++++++++++++ roles/zabbix_agent/vars/Suse.yml | 18 +++++++ roles/zabbix_javagateway/defaults/main.yml | 2 + roles/zabbix_javagateway/tasks/Suse.yml | 32 ++++++++++++ roles/zabbix_javagateway/vars/Suse.yml | 6 +++ roles/zabbix_proxy/tasks/initialize-mysql.yml | 11 +++-- roles/zabbix_proxy/vars/Suse.yml | 26 ++++++++++ roles/zabbix_repo/defaults/main.yml | 11 +++++ roles/zabbix_repo/tasks/Suse.yml | 17 +++++++ roles/zabbix_repo/vars/Suse.yml | 1 + .../zabbix_server/tasks/initialize-mysql.yml | 11 +++-- roles/zabbix_server/vars/Suse.yml | 23 +++++++++ roles/zabbix_web/handlers/main.yml | 11 ++++- roles/zabbix_web/tasks/Suse.yml | 6 +++ roles/zabbix_web/tasks/apache.yml | 2 +- roles/zabbix_web/tasks/main.yml | 5 +- .../zabbix_web/templates/apache_vhost.conf.j2 | 4 +- roles/zabbix_web/templates/php-fpm.conf.j2 | 2 +- roles/zabbix_web/vars/Suse.yml | 28 +++++++++++ 50 files changed, 426 insertions(+), 108 deletions(-) create mode 100644 changelogs/fragments/pr_1194.yml create mode 100644 roles/zabbix_agent/tasks/Suse.yml create mode 100644 roles/zabbix_agent/vars/Suse.yml create mode 100644 roles/zabbix_javagateway/tasks/Suse.yml create mode 100644 roles/zabbix_javagateway/vars/Suse.yml create mode 100644 roles/zabbix_proxy/vars/Suse.yml create mode 100644 roles/zabbix_repo/tasks/Suse.yml create mode 100644 roles/zabbix_repo/vars/Suse.yml create mode 100644 roles/zabbix_server/vars/Suse.yml create mode 100644 roles/zabbix_web/tasks/Suse.yml create mode 100644 roles/zabbix_web/vars/Suse.yml diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml index acedc322b..546f814fa 100644 --- a/.github/workflows/agent.yml +++ b/.github/workflows/agent.yml @@ -33,6 +33,7 @@ jobs: - ubuntu2004 - debian12 - debian11 + - opensuseleap15 version: - v70 - v64 diff --git a/.github/workflows/javagateway.yml b/.github/workflows/javagateway.yml index d72e124e1..d47683882 100644 --- a/.github/workflows/javagateway.yml +++ b/.github/workflows/javagateway.yml @@ -33,6 +33,7 @@ jobs: - ubuntu2004 - debian12 - debian11 + - opensuseleap15 version: - v70 - v64 diff --git a/.github/workflows/proxy.yml b/.github/workflows/proxy.yml index c77294fbc..73404e9a6 100644 --- a/.github/workflows/proxy.yml +++ b/.github/workflows/proxy.yml @@ -33,6 +33,7 @@ jobs: - ubuntu2004 - debian12 - debian11 + - opensuseleap15 collection_role: - zabbix_proxy database: @@ -43,7 +44,6 @@ jobs: - v70 - v64 - v60 - steps: - name: Check out code uses: actions/checkout@v4 diff --git a/.github/workflows/repo.yml b/.github/workflows/repo.yml index bedd2d835..184794221 100644 --- a/.github/workflows/repo.yml +++ b/.github/workflows/repo.yml @@ -27,6 +27,7 @@ jobs: - ubuntu2004 - debian12 - debian11 + - opensuseleap15 collection_role: - zabbix_repo version: diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 080e76bc5..23a6c6b7d 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -33,6 +33,7 @@ jobs: - ubuntu2004 - debian12 - debian11 + - opensuseleap15 collection_role: - zabbix_server database: diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 99d411caa..f8697cc7c 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -33,12 +33,14 @@ jobs: - ubuntu2004 - debian12 - debian11 + # - opensuseleap15 collection_role: - zabbix_web database: - mysql - pgsql web_server: + # maybe add apache? - nginx - apache version: diff --git a/changelogs/fragments/pr_1194.yml b/changelogs/fragments/pr_1194.yml new file mode 100644 index 000000000..0e4ba258d --- /dev/null +++ b/changelogs/fragments/pr_1194.yml @@ -0,0 +1,2 @@ +major_changes: + - All Roles - Add support for openSUSE Leap 15 and SLES 15. diff --git a/docs/ZABBIX_AGENT_ROLE.md b/docs/ZABBIX_AGENT_ROLE.md index 043d70576..68570133f 100644 --- a/docs/ZABBIX_AGENT_ROLE.md +++ b/docs/ZABBIX_AGENT_ROLE.md @@ -89,15 +89,16 @@ To successfully complete the install the role requires `python-netaddr` on the c See the following list of supported Operating systems with the Zabbix releases: -| Zabbix | 6.4 | 6.0 | -|---------------------|-----|-----| -| Red Hat Fam 9 | V | V | -| Red Hat Fam 8 | V | V | -| Ubuntu 24.04 noble | V | V | -| Ubuntu 22.04 jammy | V | V | -| Ubuntu 20.04 focal | V | V | -| Debian 12 bookworm | V | V | -| Debian 11 bullseye | V | V | +| Zabbix | 7.0 | 6.4 | 6.0 | +|---------------------|-----|-----|-----| +| Red Hat Fam 9 | V | V | V | +| Red Hat Fam 8 | V | V | V | +| Ubuntu 24.04 noble | V | V | V | +| Ubuntu 22.04 jammy | V | V | V | +| Ubuntu 20.04 focal | V | V | V | +| Debian 12 bookworm | V | V | V | +| Debian 11 bullseye | V | V | V | +| Suse Fam 15 | V | V | V | You can bypass this matrix by setting `enable_version_check: false` diff --git a/docs/ZABBIX_JAVAGATEWAY_ROLE.md b/docs/ZABBIX_JAVAGATEWAY_ROLE.md index a500a5fc7..e513329af 100644 --- a/docs/ZABBIX_JAVAGATEWAY_ROLE.md +++ b/docs/ZABBIX_JAVAGATEWAY_ROLE.md @@ -34,15 +34,16 @@ So, you'll need one of those operating systems.. :-) See the following list of supported Operating systems with the Zabbix releases. -| Zabbix | 6.4 | 6.0 | -|---------------------|-----|-----| -| Red Hat Fam 9 | V | V | -| Red Hat Fam 8 | V | V | -| Ubuntu 24.04 noble | V | V | -| Ubuntu 22.04 jammy | V | V | -| Ubuntu 20.04 focal | V | V | -| Debian 12 bookworm | V | V | -| Debian 11 bullseye | V | V | +| Zabbix | 7.0 | 6.4 | 6.0 | +|---------------------|-----|-----|-----| +| Red Hat Fam 9 | V | V | V | +| Red Hat Fam 8 | V | V | V | +| Ubuntu 24.04 noble | V | V | V | +| Ubuntu 22.04 jammy | V | V | V | +| Ubuntu 20.04 focal | V | V | V | +| Debian 12 bookworm | V | V | V | +| Debian 11 bullseye | V | V | V | +| Suse Fam 15 | V | V | V | You can bypass this matrix by setting `enable_version_check: false` diff --git a/docs/ZABBIX_PROXY_ROLE.md b/docs/ZABBIX_PROXY_ROLE.md index 133ed2dc5..07b086cc9 100644 --- a/docs/ZABBIX_PROXY_ROLE.md +++ b/docs/ZABBIX_PROXY_ROLE.md @@ -77,15 +77,16 @@ ansible-galaxy collection install community.postgresql See the following list of supported Operating systems with the Zabbix releases. -| Zabbix | 6.4 | 6.0 | -|---------------------|-----|-----| -| Red Hat Fam 9 | V | V | -| Red Hat Fam 8 | V | V | -| Ubuntu 24.04 noble | V | V | -| Ubuntu 22.04 jammy | V | V | -| Ubuntu 20.04 focal | V | V | -| Debian 12 bookworm | V | V | -| Debian 11 bullseye | V | V | +| Zabbix | 7.0 | 6.4 | 6.0 | +|---------------------|-----|-----|-----| +| Red Hat Fam 9 | V | V | V | +| Red Hat Fam 8 | V | V | V | +| Ubuntu 24.04 noble | V | V | V | +| Ubuntu 22.04 jammy | V | V | V | +| Ubuntu 20.04 focal | V | V | V | +| Debian 12 bookworm | V | V | V | +| Debian 11 bullseye | V | V | V | +| Suse Fam 15 | V | V | V | You can bypass this matrix by setting `enable_version_check: false` diff --git a/docs/ZABBIX_REPO_ROLE.md b/docs/ZABBIX_REPO_ROLE.md index 68aa633d9..b1e2d6839 100644 --- a/docs/ZABBIX_REPO_ROLE.md +++ b/docs/ZABBIX_REPO_ROLE.md @@ -35,15 +35,16 @@ Please send Pull Requests or suggestions when you want to use this role for othe See the following list of supported Operating systems with the Zabbix releases: -| Zabbix | 6.4 | 6.0 | -|---------------------|-----|-----| -| Red Hat Fam 9 | V | V | -| Red Hat Fam 8 | V | V | -| Ubuntu 24.04 noble | V | V | -| Ubuntu 22.04 jammy | V | V | -| Ubuntu 20.04 focal | V | V | -| Debian 12 bookworm | V | V | -| Debian 11 bullseye | V | V | +| Zabbix | 7.0 | 6.4 | 6.0 | +|---------------------|-----|-----|-----| +| Red Hat Fam 9 | V | V | V | +| Red Hat Fam 8 | V | V | V | +| Ubuntu 24.04 noble | V | V | V | +| Ubuntu 22.04 jammy | V | V | V | +| Ubuntu 20.04 focal | V | V | V | +| Debian 12 bookworm | V | V | V | +| Debian 11 bullseye | V | V | V | +| Suse Fam 15 | V | V | V | # Installation @@ -68,6 +69,10 @@ Please be aware that this role only installs the repo itself. It is generally u * `zabbix_repo_yum_gpg_check`: Optional. Yum should check GPG keys. Default: 0 * `zabbix_repo_yum_gpg_key_url`: The URL to download the Zabbix GPG key from. Default: `http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX-08EFA7DD` * `zabbix_repo_yum_schema`: Default: `https`. Option to change the web schema for the yum repository(http/https) +* `zabbix_repo_zypper`: A list with zypper repository configuration. +* `zabbix_repo_zypper_auto_import_keys`: Optional. Zypper should import GPG keys automatically. Default: true +* `zabbix_repo_zypper_disable_gpg_check`: Optional. Zypper shouldn't check GPG keys. Default: false +* `zabbix_repo_zypper_schema`: Default: `https`. Option to change the web schema for the zypper repository(http/https) # Example Playbook diff --git a/docs/ZABBIX_SERVER_ROLE.md b/docs/ZABBIX_SERVER_ROLE.md index 38fb1761a..f7a982802 100644 --- a/docs/ZABBIX_SERVER_ROLE.md +++ b/docs/ZABBIX_SERVER_ROLE.md @@ -75,15 +75,16 @@ ansible-galaxy collection install community.postgresql See the following list of supported Operating systems with the Zabbix releases: -| Zabbix | 6.4 | 6.0 | -|---------------------|-----|-----| -| Red Hat Fam 9 | V | V | -| Red Hat Fam 8 | V | V | -| Ubuntu 24.04 noble | V | V | -| Ubuntu 22.04 jammy | V | V | -| Ubuntu 20.04 focal | V | V | -| Debian 12 bookworm | V | V | -| Debian 11 bullseye | V | V | +| Zabbix | 7.0 | 6.4 | 6.0 | +|---------------------|-----|-----|-----| +| Red Hat Fam 9 | V | V | V | +| Red Hat Fam 8 | V | V | V | +| Ubuntu 24.04 noble | V | V | V | +| Ubuntu 22.04 jammy | V | V | V | +| Ubuntu 20.04 focal | | V | V | +| Debian 12 bookworm | V | V | V | +| Debian 11 bullseye | | V | V | +| Suse Fam 15 | V | V | V | You can bypass this matrix by setting `enable_version_check: false` diff --git a/molecule/zabbix_agent_tests/common/molecule.yml b/molecule/zabbix_agent_tests/common/molecule.yml index 813532d61..4df8d8219 100644 --- a/molecule/zabbix_agent_tests/common/molecule.yml +++ b/molecule/zabbix_agent_tests/common/molecule.yml @@ -11,7 +11,8 @@ platforms: networks: - name: zabbix volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro + - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host groups: - agent - ${MY_MOLECULE_VERSION:-v70} diff --git a/molecule/zabbix_agent_tests/common/playbooks/prepare.yml b/molecule/zabbix_agent_tests/common/playbooks/prepare.yml index 0fa9cfebe..fedb2a394 100644 --- a/molecule/zabbix_agent_tests/common/playbooks/prepare.yml +++ b/molecule/zabbix_agent_tests/common/playbooks/prepare.yml @@ -36,10 +36,18 @@ - ansible_os_family == 'Debian' - name: "Installing packages on Suse family" - ansible.builtin.shell: zypper install -y python-xml python-libxml2 net-tools which + community.general.zypper: + name: + - python3-xml + - python3-libxml2 + - net-tools + - iproute2 + - which + state: present register: zabbix_agent_prepare_packages_install until: zabbix_agent_prepare_packages_install is succeeded - when: ansible_os_family == 'Suse' + when: + - ansible_os_family == 'Suse' tags: - skip_ansible_lint diff --git a/molecule/zabbix_agent_tests/common/tests/common/test_agent.py b/molecule/zabbix_agent_tests/common/tests/common/test_agent.py index 43d9fe244..688b62e22 100644 --- a/molecule/zabbix_agent_tests/common/tests/common/test_agent.py +++ b/molecule/zabbix_agent_tests/common/tests/common/test_agent.py @@ -9,10 +9,8 @@ def test_zabbixagent_running_and_enabled(host, zabbix_agent_service): - # Find out why this is not working for linuxmint and opensuse - if host.system_info.distribution not in ["linuxmint", "opensuse", "ubuntu"]: - assert zabbix_agent_service.is_running - assert zabbix_agent_service.is_enabled + assert zabbix_agent_service.is_running + assert zabbix_agent_service.is_enabled def test_zabbix_agent_dot_conf(zabbix_agent_conf): @@ -32,9 +30,7 @@ def test_zabbix_include_dir(zabbix_agent_include_dir): def test_socket(host): - # Find out why this is not working for linuxmint and opensus - if host.system_info.distribution not in ["linuxmint", "opensuse"]: - assert host.socket("tcp://0.0.0.0:10050").is_listening + assert host.socket("tcp://0.0.0.0:10050").is_listening # def test_zabbix_package(host, zabbix_agent_package): diff --git a/molecule/zabbix_agent_tests/molecule/agent2/tests/conftest.py b/molecule/zabbix_agent_tests/molecule/agent2/tests/conftest.py index 5d7087ab2..a65a78273 100644 --- a/molecule/zabbix_agent_tests/molecule/agent2/tests/conftest.py +++ b/molecule/zabbix_agent_tests/molecule/agent2/tests/conftest.py @@ -10,12 +10,7 @@ @pytest.fixture def zabbix_agent_conf(host): - if host.system_info.distribution in ["opensuse"]: - passwd = host.file("/etc/zabbix/zabbix-agentd.conf") - else: - passwd = host.file("/etc/zabbix/zabbix_agent2.conf") - - return passwd + return host.file("/etc/zabbix/zabbix_agent2.conf") @pytest.fixture diff --git a/molecule/zabbix_agent_tests/molecule/agent2autopsk/tests/conftest.py b/molecule/zabbix_agent_tests/molecule/agent2autopsk/tests/conftest.py index 5d7087ab2..a65a78273 100644 --- a/molecule/zabbix_agent_tests/molecule/agent2autopsk/tests/conftest.py +++ b/molecule/zabbix_agent_tests/molecule/agent2autopsk/tests/conftest.py @@ -10,12 +10,7 @@ @pytest.fixture def zabbix_agent_conf(host): - if host.system_info.distribution in ["opensuse"]: - passwd = host.file("/etc/zabbix/zabbix-agentd.conf") - else: - passwd = host.file("/etc/zabbix/zabbix_agent2.conf") - - return passwd + return host.file("/etc/zabbix/zabbix_agent2.conf") @pytest.fixture diff --git a/molecule/zabbix_agent_tests/molecule/autopsk/tests/conftest.py b/molecule/zabbix_agent_tests/molecule/autopsk/tests/conftest.py index 1ddde968c..199b180a9 100644 --- a/molecule/zabbix_agent_tests/molecule/autopsk/tests/conftest.py +++ b/molecule/zabbix_agent_tests/molecule/autopsk/tests/conftest.py @@ -10,12 +10,7 @@ @pytest.fixture def zabbix_agent_conf(host): - if host.system_info.distribution in ["opensuse"]: - conf_file = host.file("/etc/zabbix/zabbix-agentd.conf") - else: - conf_file = host.file("/etc/zabbix/zabbix_agentd.conf") - - return conf_file + return host.file("/etc/zabbix/zabbix_agentd.conf") @pytest.fixture diff --git a/molecule/zabbix_agent_tests/molecule/default/tests/conftest.py b/molecule/zabbix_agent_tests/molecule/default/tests/conftest.py index 1ddde968c..84a8744ce 100644 --- a/molecule/zabbix_agent_tests/molecule/default/tests/conftest.py +++ b/molecule/zabbix_agent_tests/molecule/default/tests/conftest.py @@ -10,16 +10,13 @@ @pytest.fixture def zabbix_agent_conf(host): - if host.system_info.distribution in ["opensuse"]: - conf_file = host.file("/etc/zabbix/zabbix-agentd.conf") - else: - conf_file = host.file("/etc/zabbix/zabbix_agentd.conf") - - return conf_file + return host.file("/etc/zabbix/zabbix_agentd.conf") @pytest.fixture def zabbix_agent_service(host): + if host.system_info.distribution == "opensuse-leap" and host.ansible.get_variables().get("zabbix_agent2", False): + return host.service("zabbix-agent2") return host.service("zabbix-agent") diff --git a/molecule/zabbix_javagateway/molecule.yml b/molecule/zabbix_javagateway/molecule.yml index 26c0d83ea..7fd63247c 100644 --- a/molecule/zabbix_javagateway/molecule.yml +++ b/molecule/zabbix_javagateway/molecule.yml @@ -11,7 +11,8 @@ platforms: networks: - name: zabbix volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro + - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host groups: - ${MY_MOLECULE_VERSION:-v70} provisioner: diff --git a/molecule/zabbix_javagateway/prepare.yml b/molecule/zabbix_javagateway/prepare.yml index f4a4098c9..9546668b9 100644 --- a/molecule/zabbix_javagateway/prepare.yml +++ b/molecule/zabbix_javagateway/prepare.yml @@ -20,7 +20,7 @@ state: absent regexp: "path-exclude=/usr/share/doc/*" when: - - ansible_os_family != 'RedHat' + - ansible_os_family == 'Debian' # https://github.com/geerlingguy/ansible-role-java/issues/64 - name: "Apt update" @@ -28,7 +28,7 @@ register: installation_dependencies until: installation_dependencies is succeeded when: - - ansible_os_family != 'RedHat' + - ansible_os_family == 'Debian' - name: "Installing packages on NON-CentOS" ansible.builtin.apt: @@ -46,4 +46,15 @@ register: installation_dependencies until: installation_dependencies is succeeded when: - - ansible_os_family != 'RedHat' + - ansible_os_family == 'Debian' + + - name: "Installing packages on Suse" + community.general.zypper: + name: + - iproute2 + - which + state: present + register: installation_dependencies + until: installation_dependencies is succeeded + when: + - ansible_os_family == 'Suse' diff --git a/molecule/zabbix_proxy/molecule.yml b/molecule/zabbix_proxy/molecule.yml index ac0d7e33c..d8023a9ea 100644 --- a/molecule/zabbix_proxy/molecule.yml +++ b/molecule/zabbix_proxy/molecule.yml @@ -10,7 +10,8 @@ platforms: networks: - name: zabbix volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro + - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host groups: - ${MY_MOLECULE_DATABASE:-mysql} - ${MY_MOLECULE_VERSION:-v70} diff --git a/molecule/zabbix_proxy/prepare.yml b/molecule/zabbix_proxy/prepare.yml index 493f54974..bdb8b0175 100644 --- a/molecule/zabbix_proxy/prepare.yml +++ b/molecule/zabbix_proxy/prepare.yml @@ -53,8 +53,7 @@ state: present register: installation_dependencies until: installation_dependencies is succeeded - when: - - ansible_os_family == 'RedHat' + when: ansible_facts['os_family'] == 'RedHat' - name: "Apt update" ansible.builtin.shell: "apt-get update && echo exit 0 > /usr/sbin/policy-rc.d" @@ -76,6 +75,18 @@ until: installation_dependencies is succeeded when: ansible_facts['os_family'] == 'Debian' + - name: "Installing packages on Suse" + community.general.zypper: + name: + - iproute2 + - python3-pip + - sudo + update_cache: true + state: present + register: installation_dependencies + until: installation_dependencies is succeeded + when: ansible_facts['os_family'] == 'Suse' + - name: "Configure SUDO." ansible.builtin.lineinfile: dest: /etc/sudoers diff --git a/molecule/zabbix_repo/molecule.yml b/molecule/zabbix_repo/molecule.yml index 64b290e9d..c000230a1 100644 --- a/molecule/zabbix_repo/molecule.yml +++ b/molecule/zabbix_repo/molecule.yml @@ -10,7 +10,8 @@ platforms: networks: - name: zabbix volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro + - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host groups: - ${MY_MOLECULE_VERSION:-v70} diff --git a/molecule/zabbix_repo/prepare.yml b/molecule/zabbix_repo/prepare.yml index 1d33fac42..528b89291 100644 --- a/molecule/zabbix_repo/prepare.yml +++ b/molecule/zabbix_repo/prepare.yml @@ -9,7 +9,7 @@ register: installation_dependencies until: installation_dependencies is succeeded when: - - ansible_os_family != 'RedHat' + - ansible_os_family == 'Debian' - name: "Configure SUDO." ansible.builtin.lineinfile: diff --git a/molecule/zabbix_repo/tests/test_default.py b/molecule/zabbix_repo/tests/test_default.py index 81d1393f1..724946c6d 100644 --- a/molecule/zabbix_repo/tests/test_default.py +++ b/molecule/zabbix_repo/tests/test_default.py @@ -16,4 +16,6 @@ def test_zabbix_manage_repo_installed(host): result = host.ansible("command", "yum update -y", check=False, become=True)["rc"] elif os in ["debian", "ubuntu"]: result = host.ansible("command", "apt update", check=False, become=True)["rc"] + elif os in ["opensuse-leap"]: + result = host.ansible("command", "zypper refresh", check=False, become=True)["rc"] assert result == 0 diff --git a/molecule/zabbix_server/molecule.yml b/molecule/zabbix_server/molecule.yml index 17a44bcbc..2cd27796b 100644 --- a/molecule/zabbix_server/molecule.yml +++ b/molecule/zabbix_server/molecule.yml @@ -10,7 +10,8 @@ platforms: networks: - name: zabbix volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro + - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host groups: - ${MY_MOLECULE_DATABASE:-mysql} - ${MY_MOLECULE_VERSION:-v70} diff --git a/molecule/zabbix_server/prepare.yml b/molecule/zabbix_server/prepare.yml index 493f54974..48d65405c 100644 --- a/molecule/zabbix_server/prepare.yml +++ b/molecule/zabbix_server/prepare.yml @@ -76,6 +76,17 @@ until: installation_dependencies is succeeded when: ansible_facts['os_family'] == 'Debian' + - name: "Installing packages on Suse" + community.general.zypper: + name: + - iproute2 + - sudo + state: present + update_cache: true + register: installation_dependencies + until: installation_dependencies is succeeded + when: ansible_facts['os_family'] == 'Suse' + - name: "Configure SUDO." ansible.builtin.lineinfile: dest: /etc/sudoers diff --git a/molecule/zabbix_web/molecule.yml b/molecule/zabbix_web/molecule.yml index 80c7acab0..c60aff9ac 100644 --- a/molecule/zabbix_web/molecule.yml +++ b/molecule/zabbix_web/molecule.yml @@ -18,7 +18,8 @@ platforms: networks: - name: zabbix volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro + - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host groups: - ${MY_MOLECULE_DATABASE:-mysql} - ${MY_MOLECULE_VERSION:-v70} diff --git a/molecule/zabbix_web/prepare.yml b/molecule/zabbix_web/prepare.yml index 1f6513042..d67205a69 100644 --- a/molecule/zabbix_web/prepare.yml +++ b/molecule/zabbix_web/prepare.yml @@ -77,6 +77,19 @@ until: installation_dependencies is succeeded when: ansible_facts['os_family'] == 'Debian' + - name: "Installing packages on Suse" + community.general.zypper: + name: + - iproute2 + - python3-pip + - sudo + - curl + update_cache: true + state: present + register: installation_dependencies + until: installation_dependencies is succeeded + when: ansible_facts['os_family'] == 'Suse' + - name: "Configure SUDO." ansible.builtin.lineinfile: dest: /etc/sudoers @@ -87,7 +100,7 @@ ansible.builtin.dnf: name: "@php:8.0/common" when: - - ansible_os_family == 'RedHat' + - ansible_facts['os_family'] == 'RedHat' - ansible_distribution_major_version == "8" - name: Set PHP packages (Centos 8+) @@ -106,8 +119,7 @@ - php-pear - php-pecl-apcu - php-xml - when: - - ansible_os_family == "RedHat" + when: ansible_facts['os_family'] == 'RedHat' - name: Workaround for geerlingguy.php missing ubuntu-24.04 support when: @@ -136,6 +148,11 @@ - php{{ __php_default_version_debian }}-apcu - php{{ __php_default_version_debian }}-sqlite3 + - name: Set PHP Version (Suse) + ansible.builtin.set_fact: + __php_default_version_suse: "8" + when: ansible_facts['os_family'] == 'Suse' + roles: - role: geerlingguy.apache when: @@ -147,6 +164,13 @@ - role: zabbix_server post_tasks: + - name: Suse | Create default php-fpm config + ansible.builtin.copy: + remote_src: true + src: "/etc/php{{ __php_default_version_suse }}/fpm/php-fpm.conf.default" + dest: "/etc/php{{ __php_default_version_suse }}/fpm/php-fpm.conf" + when: ansible_facts['os_family'] == 'Suse' + - name: "Remove file" ansible.builtin.file: path: "{{ item }}" diff --git a/molecule/zabbix_web/tests/test_default.py b/molecule/zabbix_web/tests/test_default.py index f4882b97b..3b2636e23 100644 --- a/molecule/zabbix_web/tests/test_default.py +++ b/molecule/zabbix_web/tests/test_default.py @@ -13,7 +13,11 @@ def test_zabbix_package(host): version = ansible_data['zabbix_web_version'] webserver = ansible_data['zabbix_web_http_server'] - zabbix_web = host.package(f'zabbix-%s-conf' % webserver) + package_name = f'zabbix-{webserver}-conf' + if host.system_info.distribution == "opensuse-leap" and version == 7.0: + package_name = f'zabbix-{webserver}-conf-php8' + + zabbix_web = host.package(package_name) assert str(version) in zabbix_web.version @@ -32,6 +36,13 @@ def test_zabbix_web(host): elif zabbix_websrv == "nginx": assert zabbix_web.user == "nginx" assert zabbix_web.group == "nginx" + elif host.system_info.distribution == "opensuse-leap": + if zabbix_websrv == "apache": + assert zabbix_web.user == "wwwrun" + assert zabbix_web.group == "wwwrun" + elif zabbix_websrv == "nginx": + assert zabbix_web.user == "nginx" + assert zabbix_web.group == "nginx" assert zabbix_web.mode == 0o644 diff --git a/roles/zabbix_agent/tasks/Suse.yml b/roles/zabbix_agent/tasks/Suse.yml new file mode 100644 index 000000000..49f909b31 --- /dev/null +++ b/roles/zabbix_agent/tasks/Suse.yml @@ -0,0 +1,49 @@ +--- +# Tasks specific for SUSE systems + +- name: Check if warn parameter can be used for shell module + ansible.builtin.set_fact: + produce_warn: false + when: ansible_version.full is version("2.14", "<") + tags: + - always + +- name: "Suse | Installing zabbix-agent" + ansible.builtin.package: + pkg: + - "{{ zabbix_agent_package }}" + state: "{{ zabbix_agent_package_state }}" + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + register: zabbix_agent_package_installed + until: zabbix_agent_package_installed is succeeded + become: true + tags: + - install + +- name: "Suse | Installing zabbix-{sender,get}" + ansible.builtin.package: + pkg: + - "{{ zabbix_sender_package }}" + - "{{ zabbix_get_package }}" + state: "{{ zabbix_agent_package_state }}" + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + register: zabbix_agent_package_installed + until: zabbix_agent_package_installed is succeeded + when: + - not zabbix_agent_install_agent_only + become: true + tags: + - install + +- name: "Suse | Enable the service" + ansible.builtin.service: + name: "{{ zabbix_agent_service }}" + enabled: true + use: service + become: true + tags: + - service diff --git a/roles/zabbix_agent/vars/Suse.yml b/roles/zabbix_agent/vars/Suse.yml new file mode 100644 index 000000000..c0f002156 --- /dev/null +++ b/roles/zabbix_agent/vars/Suse.yml @@ -0,0 +1,18 @@ +--- +# vars file for zabbix_agent (SLES) + +zabbix_agent: zabbix-agent +zabbix_agent_service: "{{ zabbix_agent2 | ternary('zabbix-agent2', 'zabbix-agent') }}" +zabbix_agent_conf: zabbix_agentd.conf +zabbix_agent2_conf: zabbix_agent2.conf + +zabbix_valid_agent_versions: + # SLES + "12": + - 7.0 + - 6.4 + - 6.0 + "15": + - 7.0 + - 6.4 + - 6.0 diff --git a/roles/zabbix_javagateway/defaults/main.yml b/roles/zabbix_javagateway/defaults/main.yml index 093d189f4..a06311ae0 100644 --- a/roles/zabbix_javagateway/defaults/main.yml +++ b/roles/zabbix_javagateway/defaults/main.yml @@ -8,6 +8,8 @@ zabbix_java_gateway_conf_mode: "0644" zabbix_javagateway_disable_repo: - epel +zabbix_javagateway_openjdk_version: 17 + zabbix_javagateway_pidfile: /run/zabbix/zabbix_java_gateway.pid zabbix_javagateway_listenip: 0.0.0.0 zabbix_javagateway_listenport: 10052 diff --git a/roles/zabbix_javagateway/tasks/Suse.yml b/roles/zabbix_javagateway/tasks/Suse.yml new file mode 100644 index 000000000..b8dc67680 --- /dev/null +++ b/roles/zabbix_javagateway/tasks/Suse.yml @@ -0,0 +1,32 @@ +--- +# Tasks specific for Suse systems + +# SLES 15 comes with openjdk-11 by default. +# In order for the zabbix-java-gateway to work, we need to install openjdk-17. +- name: "Suse | Install openjdk-{{ zabbix_javagateway_openjdk_version }}" + ansible.builtin.package: + pkg: + - java-{{ zabbix_javagateway_openjdk_version }}-openjdk-headless + - java-{{ zabbix_javagateway_openjdk_version }}-openjdk + state: "{{ zabbix_javagateway_package_state }}" + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + register: zabbix_java_gateway_install + until: zabbix_java_gateway_install is succeeded + become: true + tags: + - install + +- name: "Suse | Installing zabbix-java-gateway" + ansible.builtin.package: + pkg: zabbix-java-gateway + state: "{{ zabbix_javagateway_package_state }}" + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + register: zabbix_java_gateway_install + until: zabbix_java_gateway_install is succeeded + become: true + tags: + - install diff --git a/roles/zabbix_javagateway/vars/Suse.yml b/roles/zabbix_javagateway/vars/Suse.yml new file mode 100644 index 000000000..4adb0cf07 --- /dev/null +++ b/roles/zabbix_javagateway/vars/Suse.yml @@ -0,0 +1,6 @@ +--- +zabbix_valid_javagateway_versions: + "15": + - 7.0 + - 6.4 + - 6.0 diff --git a/roles/zabbix_proxy/tasks/initialize-mysql.yml b/roles/zabbix_proxy/tasks/initialize-mysql.yml index 2fe5653be..5db230a4c 100644 --- a/roles/zabbix_proxy/tasks/initialize-mysql.yml +++ b/roles/zabbix_proxy/tasks/initialize-mysql.yml @@ -18,12 +18,17 @@ # NOTE: Upgrading system-packages with pip is generally a bad idea, but # these packaged older versions seems to have a problem with mysql 8 and above - name: Upgrade pymysql - when: - - ansible_facts['distribution'] in ['CentOS', 'Debian', 'Ubuntu'] - - ansible_facts['distribution_release'] in ['Core', 'buster', 'bullseye', 'bionic', 'focal'] + when: _upgrade_debian_pymysql or _upgrade_suse_pymysql ansible.builtin.pip: name: "pymysql>=0.10.0,<0.11.0" state: latest + vars: + _upgrade_debian_pymysql: "{{ (ansible_facts['distribution'] in ['Debian', 'Ubuntu'] and ansible_facts['distribution_release'] in ['bullseye', 'focal']) }}" + _upgrade_suse_pymysql: "{{ ansible_facts['os_family'] in ['Suse'] }}" + tags: + - install + - database + - dependencies - name: "MySQL Database prep" when: zabbix_proxy_database_creation | bool diff --git a/roles/zabbix_proxy/vars/Suse.yml b/roles/zabbix_proxy/vars/Suse.yml new file mode 100644 index 000000000..bf7c940e6 --- /dev/null +++ b/roles/zabbix_proxy/vars/Suse.yml @@ -0,0 +1,26 @@ +--- +zabbix_valid_proxy_versions: + "15": + - 7.0 + - 6.4 + - 6.0 + +_zabbix_proxy_pgsql_dependencies: + - "{{ zabbix_proxy_install_database_client | ternary('postgresql', '') }}" + - gzip + - python3-psycopg2 + +_zabbix_proxy_mysql_dependencies: + "15": + - "{{ zabbix_proxy_install_database_client | ternary('mysql', '') }}" + - python3-PyMySQL + +_zabbix_proxy_sqlite3_dependencies: + - sqlite + +_zabbix_proxy_fping6location: null +_zabbix_proxy_fpinglocation: /usr/sbin/fping + +_zabbix_proxy_packages: + - "zabbix-proxy-{{ zabbix_proxy_database }}" + - "zabbix-sql-scripts" diff --git a/roles/zabbix_repo/defaults/main.yml b/roles/zabbix_repo/defaults/main.yml index 4e22f7d59..69a8a1df8 100644 --- a/roles/zabbix_repo/defaults/main.yml +++ b/roles/zabbix_repo/defaults/main.yml @@ -24,3 +24,14 @@ zabbix_repo_apt_priority: zabbix_repo_deb_gpg_key_url: http://repo.zabbix.com/zabbix-official-repo.key zabbix_repo_deb_include_deb_src: true zabbix_repo_rpm_gpg_key_url: http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX-08EFA7DD + +zabbix_repo_zypper_auto_import_keys: true +zabbix_repo_zypper_disable_gpg_check: false +zabbix_repo_zypper_schema: https +zabbix_repo_zypper: + - name: zabbix + description: Zabbix Official Repository + repo: "{{ zabbix_repo_zypper_schema }}://repo.zabbix.com/zabbix/{{ zabbix_repo_version | regex_search('^[0-9]+.[0-9]+') }}/sles/{{ ansible_distribution_major_version }}/$basearch/" + disable_gpg_check: "{{ zabbix_repo_zypper_disable_gpg_check }}" + auto_import_keys: "{{ zabbix_repo_zypper_auto_import_keys }}" + state: present diff --git a/roles/zabbix_repo/tasks/Suse.yml b/roles/zabbix_repo/tasks/Suse.yml new file mode 100644 index 000000000..9b93dbc1f --- /dev/null +++ b/roles/zabbix_repo/tasks/Suse.yml @@ -0,0 +1,17 @@ +--- +# Tasks specific for Suse systems + +- name: "Suse | Install repos" + community.general.zypper_repository: + name: "{{ item.name }}" + description: "{{ item.description }}" + repo: "{{ item.repo }}" + disable_gpg_check: "{{ item.disable_gpg_check | default(false) }}" + auto_import_keys: "{{ item.auto_import_keys | default('true') }}" + priority: "{{ item.priority | default('99') }}" + runrefresh: "{{ item.runrefresh | default(false) }}" + state: "{{ item.state | default('present') }}" + with_items: "{{ zabbix_repo_zypper }}" + become: true + tags: + - install diff --git a/roles/zabbix_repo/vars/Suse.yml b/roles/zabbix_repo/vars/Suse.yml new file mode 100644 index 000000000..ed97d539c --- /dev/null +++ b/roles/zabbix_repo/vars/Suse.yml @@ -0,0 +1 @@ +--- diff --git a/roles/zabbix_server/tasks/initialize-mysql.yml b/roles/zabbix_server/tasks/initialize-mysql.yml index 9d58e8c23..d66a2e75b 100644 --- a/roles/zabbix_server/tasks/initialize-mysql.yml +++ b/roles/zabbix_server/tasks/initialize-mysql.yml @@ -17,12 +17,17 @@ # NOTE: Upgrading system-packages with pip is generally a bad idea, but # these packaged older versions seems to have a problem with mysql 8 and above - name: Upgrade pymysql - when: - - ansible_facts['distribution'] in ['Debian', 'Ubuntu'] - - ansible_facts['distribution_release'] in ['bullseye', 'focal'] + when: _upgrade_debian_pymysql or _upgrade_suse_pymysql ansible.builtin.pip: name: "pymysql>=0.10.0,<0.11.0" state: latest + vars: + _upgrade_debian_pymysql: "{{ (ansible_facts['distribution'] in ['Debian', 'Ubuntu'] and ansible_facts['distribution_release'] in ['bullseye', 'focal']) }}" + _upgrade_suse_pymysql: "{{ ansible_facts['os_family'] in ['Suse'] }}" + tags: + - install + - database + - dependencies - name: "MySQL Database prep" when: zabbix_server_database_creation | bool diff --git a/roles/zabbix_server/vars/Suse.yml b/roles/zabbix_server/vars/Suse.yml new file mode 100644 index 000000000..edb68b23e --- /dev/null +++ b/roles/zabbix_server/vars/Suse.yml @@ -0,0 +1,23 @@ +--- +zabbix_valid_server_versions: + "15": + - 7.0 + - 6.4 + - 6.0 + +_zabbix_server_pgsql_dependencies: + - "{{ zabbix_server_install_database_client | ternary('postgresql', '') }}" + - gzip + - python3-psycopg2 + +_zabbix_server_mysql_dependencies: + - "{{ zabbix_server_install_database_client | ternary('mysql', '') }}" + - gzip + - python3-PyMySQL + +_zabbix_server_fping6location: null +_zabbix_server_fpinglocation: /usr/sbin/fping + +_zabbix_server_packages: + - "zabbix-server-{{ zabbix_server_database }}" + - "zabbix-sql-scripts" diff --git a/roles/zabbix_web/handlers/main.yml b/roles/zabbix_web/handlers/main.yml index bcc34a816..8d44ca305 100644 --- a/roles/zabbix_web/handlers/main.yml +++ b/roles/zabbix_web/handlers/main.yml @@ -28,10 +28,19 @@ state: restarted enabled: true become: true + when: ansible_facts['os_family'] == 'Debian' + +- name: restart php-fpm + ansible.builtin.service: + name: php-fpm + state: restarted + enabled: true + become: true + when: ansible_facts['os_family'] == 'Suse' - name: "clean repo files from proxy creds" ansible.builtin.shell: ls /etc/yum.repos.d/zabbix* && sed -i 's/^proxy =.*//' /etc/yum.repos.d/zabbix* || true become: true when: - - ansible_os_family == 'RedHat' + - ansible_facts['os_family'] == 'RedHat' - zabbix_http_proxy is defined or zabbix_https_proxy is defined diff --git a/roles/zabbix_web/tasks/Suse.yml b/roles/zabbix_web/tasks/Suse.yml new file mode 100644 index 000000000..b30957bf6 --- /dev/null +++ b/roles/zabbix_web/tasks/Suse.yml @@ -0,0 +1,6 @@ +--- +# - name: "Suse | Setting Short PHP Version" +# ansible.builtin.set_fact: +# zabbix_web_php_installed_version: "{{ zabbix_web_php_installed_version | regex_replace('\\.', '') }}" +# tags: +# - always diff --git a/roles/zabbix_web/tasks/apache.yml b/roles/zabbix_web/tasks/apache.yml index 19d304595..080cbcf28 100644 --- a/roles/zabbix_web/tasks/apache.yml +++ b/roles/zabbix_web/tasks/apache.yml @@ -66,6 +66,6 @@ group: "{{ zabbix_web_group }}" mode: 0644 become: true - when: ansible_os_family == "Debian" and zabbix_web_create_vhost + when: ansible_facts['os_family'] == 'Debian' and zabbix_web_create_vhost tags: - config diff --git a/roles/zabbix_web/tasks/main.yml b/roles/zabbix_web/tasks/main.yml index 84c8f32c0..19a12ff21 100644 --- a/roles/zabbix_web/tasks/main.yml +++ b/roles/zabbix_web/tasks/main.yml @@ -113,7 +113,7 @@ tags: - config -- name: "Debian | Install PHP" +- name: "Debian / Suse | Install PHP" ansible.builtin.template: src: php-fpm.conf.j2 dest: "{{ zabbix_php_fpm_dir }}/zabbix.conf" @@ -123,8 +123,9 @@ become: true when: - zabbix_web_create_php_fpm - - ansible_os_family == "Debian" + - ansible_os_family in ["Debian", "Suse"] notify: - restart php-fpm-version + - restart php-fpm tags: - config diff --git a/roles/zabbix_web/templates/apache_vhost.conf.j2 b/roles/zabbix_web/templates/apache_vhost.conf.j2 index 334861d9b..fc7086669 100644 --- a/roles/zabbix_web/templates/apache_vhost.conf.j2 +++ b/roles/zabbix_web/templates/apache_vhost.conf.j2 @@ -36,7 +36,7 @@ DirectoryIndex index.php -{% if ansible_os_family == "RedHat" %} +{% if ansible_os_family in ["RedHat", "Suse"] %} SetHandler "proxy:unix:{{ zabbix_php_fpm_listen }}|fcgi://localhost" @@ -118,7 +118,7 @@ SSLRandomSeed connect builtin DirectoryIndex index.php -{% if ansible_os_family == "RedHat" %} +{% if ansible_os_family in ["RedHat", "Suse"] %} SetHandler "proxy:unix:{{ zabbix_php_fpm_listen }}|fcgi://localhost" diff --git a/roles/zabbix_web/templates/php-fpm.conf.j2 b/roles/zabbix_web/templates/php-fpm.conf.j2 index 3dd337e4d..ea4376455 100644 --- a/roles/zabbix_web/templates/php-fpm.conf.j2 +++ b/roles/zabbix_web/templates/php-fpm.conf.j2 @@ -3,7 +3,7 @@ user = {{ zabbix_php_fpm_conf_user if zabbix_php_fpm_conf_user is defined else z group = {{ zabbix_php_fpm_conf_group if zabbix_php_fpm_conf_group is defined else zabbix_web_group }} listen = {{ zabbix_php_fpm_listen }} -{% if zabbix_php_fpm_conf_listen and ansible_os_family != 'Debian' %} +{% if zabbix_php_fpm_conf_listen and ansible_os_family not in ['Debian', 'Suse'] %} listen.acl_users = {{ zabbix_php_fpm_conf_user if zabbix_php_fpm_conf_user is defined else zabbix_web_user }} {% endif %} listen.owner = {{ zabbix_php_fpm_conf_user if zabbix_php_fpm_conf_user is defined else zabbix_web_user }} diff --git a/roles/zabbix_web/vars/Suse.yml b/roles/zabbix_web/vars/Suse.yml new file mode 100644 index 000000000..ebb7e84f5 --- /dev/null +++ b/roles/zabbix_web/vars/Suse.yml @@ -0,0 +1,28 @@ +--- +_apache_user: wwwrun +_apache_group: wwwrun +_apache_log: apache2 +_apache_service: apache2 +_apache_vhost_location: /etc/apache2/conf.d/zabbix.conf + +_php_fpm_dir: "/etc/php8/fpm/php-fpm.d" +_php_fpm_session: /var/lib/php8/sessions +_zabbix_php_fpm_listen: /run/php-fpm/zabbix.sock + +_nginx_user: nginx +_nginx_group: nginx +_nginx_vhost_location: /etc/nginx/conf.d/zabbix.conf +_nginx_log_path: /var/log/nginx +_nginx_service: nginx + +zabbix_valid_web_versions: + "15": + - 7.0 + - 6.4 + - 6.0 + +_zabbix_web_package: "zabbix-web-{{ zabbix_server_database }}" +_zabbix_web_apache_packages: + - zabbix-apache-conf +_zabbix_web_nginx_packages: + - zabbix-nginx-conf