From 79af636068709c7eb98139a47414da4738bc6206 Mon Sep 17 00:00:00 2001 From: Troy W Date: Sun, 22 Oct 2023 17:39:19 -0400 Subject: [PATCH] Removed Support for Non-Supported Versions of Zabbix --- .github/workflows/agent.yml | 6 +- .github/workflows/javagateway.yml | 5 -- .github/workflows/plugins-integration.yml | 2 - .github/workflows/proxy.yml | 2 - .github/workflows/server.yml | 9 --- .github/workflows/web.yml | 9 --- docs/ZABBIX_AGENT_ROLE.md | 20 +++---- docs/ZABBIX_JAVAGATEWAY_ROLE.md | 20 +++---- docs/ZABBIX_PROXY_ROLE.md | 20 +++---- docs/ZABBIX_SERVER_ROLE.md | 18 +++--- docs/ZABBIX_WEB_ROLE.md | 18 +++--- .../zabbix_agent_tests/common/molecule.yml | 4 -- molecule/zabbix_javagateway/molecule.yml | 4 -- molecule/zabbix_proxy/molecule.yml | 4 -- molecule/zabbix_server/molecule.yml | 6 -- molecule/zabbix_web/molecule.yml | 6 -- roles/zabbix_agent/tasks/main.yml | 2 +- .../templates/zabbix_agent2.conf.j2 | 2 - .../templates/zabbix_agentd.conf.j2 | 8 +-- roles/zabbix_agent/vars/Debian.yml | 14 ----- roles/zabbix_agent/vars/RedHat.yml | 6 -- roles/zabbix_agent/vars/Windows.yml | 2 - roles/zabbix_javagateway/tasks/main.yml | 2 +- roles/zabbix_javagateway/vars/Debian.yml | 11 ---- roles/zabbix_javagateway/vars/RedHat.yml | 6 -- roles/zabbix_proxy/tasks/Debian.yml | 2 - roles/zabbix_proxy/tasks/main.yml | 2 +- .../templates/zabbix_proxy.conf.j2 | 8 +-- roles/zabbix_server/tasks/Debian.yml | 2 - roles/zabbix_server/tasks/RedHat.yml | 2 - roles/zabbix_server/tasks/mysql.yml | 57 ------------------- .../templates/zabbix_server.conf.j2 | 6 +- roles/zabbix_server/vars/Debian.yml | 9 --- roles/zabbix_server/vars/RedHat.yml | 4 -- roles/zabbix_web/handlers/main.yml | 2 - roles/zabbix_web/vars/Debian.yml | 9 --- 36 files changed, 59 insertions(+), 250 deletions(-) diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml index 244429db8..007f6a4c8 100644 --- a/.github/workflows/agent.yml +++ b/.github/workflows/agent.yml @@ -22,23 +22,19 @@ jobs: container: - rockylinux9 - rockylinux8 + - centos7 - ubuntu2204 - ubuntu2004 - debian12 - debian11 - debian10 version: - - v64 - - v62 - v60 scenario_name: - default - autopsk - agent2 - agent2autopsk - exclude: - - container: debian12 - version: v62 steps: - name: Check out code diff --git a/.github/workflows/javagateway.yml b/.github/workflows/javagateway.yml index 374371d6d..206e1dea1 100644 --- a/.github/workflows/javagateway.yml +++ b/.github/workflows/javagateway.yml @@ -29,16 +29,11 @@ jobs: - debian11 - debian10 version: - - v64 - - v62 - v60 include: - interpreter: python3 - interpreter: python container: centos7 - exclude: - - container: debian12 - version: v62 collection_role: - zabbix_javagateway steps: diff --git a/.github/workflows/plugins-integration.yml b/.github/workflows/plugins-integration.yml index f23071a1b..4db7d729f 100644 --- a/.github/workflows/plugins-integration.yml +++ b/.github/workflows/plugins-integration.yml @@ -21,8 +21,6 @@ jobs: matrix: zabbix_container: - version: "6.0" - - version: "6.2" - - version: "6.4" ansible: # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-changelogs - stable-2.12 diff --git a/.github/workflows/proxy.yml b/.github/workflows/proxy.yml index 5efae2bbd..0a15dd092 100644 --- a/.github/workflows/proxy.yml +++ b/.github/workflows/proxy.yml @@ -35,8 +35,6 @@ jobs: - pgsql - sqlite3 version: - - v64 - - v62 - v60 include: - interpreter: python3 diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index b768dd664..0b132a042 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -33,18 +33,9 @@ jobs: - mysql - pgsql version: - - v64 - - v62 - v60 include: - interpreter: python3 - exclude: - - container: debian12 - version: v62 - - container: debian10 - version: v62 - - container: debian10 - version: v64 steps: - name: Check out code uses: actions/checkout@v4 diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index ec85ef49c..a865da716 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -35,18 +35,9 @@ jobs: web_server: - nginx version: - - v64 - - v62 - v60 include: - interpreter: python3 - exclude: - - container: debian10 - version: v62 - - container: debian10 - version: v64 - - container: debian12 - version: v62 steps: - name: Check out code uses: actions/checkout@v4 diff --git a/docs/ZABBIX_AGENT_ROLE.md b/docs/ZABBIX_AGENT_ROLE.md index 5a88c85d2..9113aec97 100644 --- a/docs/ZABBIX_AGENT_ROLE.md +++ b/docs/ZABBIX_AGENT_ROLE.md @@ -90,16 +90,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.2 | 6.0 | -|---------------------|-----|-----|-----| -| Red Hat Fam 9 | V | V | V | -| Red Hat Fam 8 | V | V | V | -| Red Hat Fam 7 | 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 | -| Debian 10 buster | V | V | V | +| Zabbix | 6.0 | +|---------------------|-----| +| Red Hat Fam 9 | V | +| Red Hat Fam 8 | V | +| Red Hat Fam 7 | V | +| Ubuntu 22.04 jammy | V | +| Ubuntu 20.04 focal | V | +| Debian 12 bookworm | V | +| Debian 11 bullseye | V | +| Debian 10 buster | V | # Getting started diff --git a/docs/ZABBIX_JAVAGATEWAY_ROLE.md b/docs/ZABBIX_JAVAGATEWAY_ROLE.md index ef33008e0..c792f9a96 100644 --- a/docs/ZABBIX_JAVAGATEWAY_ROLE.md +++ b/docs/ZABBIX_JAVAGATEWAY_ROLE.md @@ -34,16 +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.2 | 6.0 | -|---------------------|-----|-----|-----| -| Red Hat Fam 9 | V | V | V | -| Red Hat Fam 8 | V | V | V | -| Red Hat Fam 7 | V | V | V | -| Ubuntu 22.04 jammy | V | V | V | -| Ubuntu 20.04 focal | V | V | V | -| Debian 12 bookworm | V | | V | -| Debian 11 bullseye | V | V | V | -| Debian 10 buster | V | V | V | +| Zabbix |6.0 | +|---------------------|-----| +| Red Hat Fam 9 | V | +| Red Hat Fam 8 | V | +| Red Hat Fam 7 | V | +| Ubuntu 22.04 jammy | V | +| Ubuntu 20.04 focal | V | +| Debian 12 bookworm | V | +| Debian 11 bullseye | V | +| Debian 10 buster | V | # Role Variables diff --git a/docs/ZABBIX_PROXY_ROLE.md b/docs/ZABBIX_PROXY_ROLE.md index f883e73b2..df6f6e670 100644 --- a/docs/ZABBIX_PROXY_ROLE.md +++ b/docs/ZABBIX_PROXY_ROLE.md @@ -77,16 +77,16 @@ ansible-galaxy collection install community.postgresql See the following list of supported Operating systems with the Zabbix releases. -| Zabbix | 6.4 | 6.2 | 6.0 | -|---------------------|-----|-----|-----| -| Red Hat Fam 9 | V | V | V | -| Red Hat Fam 8 | V | V | V | -| Red Hat Fam 7 | V | V | V | -| Ubuntu 22.04 jammy | V | V | V | -| Ubuntu 20.04 focal | V | V | V | -| Debian 12 bookworm | V | | V | -| Debian 11 bullseye | V | V | V | -| Debian 10 buster | V | V | V | +| Zabbix |6.0 | +|---------------------|-----| +| Red Hat Fam 9 | V | +| Red Hat Fam 8 | V | +| Red Hat Fam 7 | V | +| Ubuntu 22.04 jammy | V | +| Ubuntu 20.04 focal | V | +| Debian 12 bookworm | V | +| Debian 11 bullseye | V | +| Debian 10 buster | V | # Role Variables diff --git a/docs/ZABBIX_SERVER_ROLE.md b/docs/ZABBIX_SERVER_ROLE.md index f526996c4..31ab50844 100644 --- a/docs/ZABBIX_SERVER_ROLE.md +++ b/docs/ZABBIX_SERVER_ROLE.md @@ -75,15 +75,15 @@ ansible-galaxy collection install community.postgresql See the following list of supported Operating systems with the Zabbix releases: -| Zabbix | 6.4 | 6.2 | 6.0 | -|---------------------|-----|-----|-----| -| Red Hat Fam 9 | V | V | V | -| Red Hat Fam 8 | V | V | V | -| Ubuntu 22.04 jammy | V | V | V | -| Ubuntu 20.04 focal | V | V | V | -| Debian 12 bookworm | V | | V | -| Debian 11 bullseye | V | V | V | -| Debian 10 buster | | | V | +| Zabbix | 6.0 | +|---------------------|-----| +| Red Hat Fam 9 | V | +| Red Hat Fam 8 | V | +| Ubuntu 22.04 jammy | V | +| Ubuntu 20.04 focal | V | +| Debian 12 bookworm | V | +| Debian 11 bullseye | V | +| Debian 10 buster | V | # Installation diff --git a/docs/ZABBIX_WEB_ROLE.md b/docs/ZABBIX_WEB_ROLE.md index 4b939bed0..3f4f7f54e 100644 --- a/docs/ZABBIX_WEB_ROLE.md +++ b/docs/ZABBIX_WEB_ROLE.md @@ -54,15 +54,15 @@ ansible-galaxy collection install community.general See the following list of supported Operating Systems with the Zabbix releases. -| Zabbix | 6.4 | 6.2 | 6.0 | -|---------------------|-----|-----|-----| -| Red Hat Fam 9 | V | V | V | -| Red Hat Fam 8 | V | V | V | -| Ubuntu 22.04 jammy | V | V | V | -| Ubuntu 20.04 focal | V | V | V | -| Debian 12 bookworm | V | | V | -| Debian 11 bullseye | V | V | V | -| Debian 10 buster | | | V | +| Zabbix | 6.0 | +|---------------------|-----| +| Red Hat Fam 9 | V | +| Red Hat Fam 8 | V | +| Ubuntu 22.04 jammy | V | +| Ubuntu 20.04 focal | V | +| Debian 12 bookworm | V | +| Debian 11 bullseye | V | +| Debian 10 buster | V | # Installation diff --git a/molecule/zabbix_agent_tests/common/molecule.yml b/molecule/zabbix_agent_tests/common/molecule.yml index a48b6ae60..cba1ac16e 100644 --- a/molecule/zabbix_agent_tests/common/molecule.yml +++ b/molecule/zabbix_agent_tests/common/molecule.yml @@ -35,10 +35,6 @@ provisioner: zabbix_agent_listenip: 0.0.0.0 zabbix_agent_tlsconnect: psk zabbix_agent_tlsaccept: psk - v64: - zabbix_agent_version: 6.4 - v62: - zabbix_agent_version: 6.2 v60: zabbix_agent_version: 6.0 scenario: diff --git a/molecule/zabbix_javagateway/molecule.yml b/molecule/zabbix_javagateway/molecule.yml index ee072707d..21229e86d 100644 --- a/molecule/zabbix_javagateway/molecule.yml +++ b/molecule/zabbix_javagateway/molecule.yml @@ -26,10 +26,6 @@ provisioner: ansible_python_interpreter: /usr/bin/python3 python: ansible_python_interpreter: /usr/bin/python - v64: - zabbix_javagateway_version: 6.4 - v62: - zabbix_javagateway_version: 6.2 v60: zabbix_javagateway_version: 6.0 diff --git a/molecule/zabbix_proxy/molecule.yml b/molecule/zabbix_proxy/molecule.yml index 4eb173acf..7d7756231 100644 --- a/molecule/zabbix_proxy/molecule.yml +++ b/molecule/zabbix_proxy/molecule.yml @@ -26,10 +26,6 @@ provisioner: ansible_python_interpreter: /usr/bin/python3 python: ansible_python_interpreter: /usr/bin/python - v64: - zabbix_proxy_version: 6.4 - v62: - zabbix_proxy_version: 6.2 v60: zabbix_proxy_version: 6.0 mysql: diff --git a/molecule/zabbix_server/molecule.yml b/molecule/zabbix_server/molecule.yml index 2424455f4..fca4a17fc 100644 --- a/molecule/zabbix_server/molecule.yml +++ b/molecule/zabbix_server/molecule.yml @@ -27,14 +27,8 @@ provisioner: ansible_python_interpreter: /usr/bin/python3 python: ansible_python_interpreter: /usr/bin/python - v64: - zabbix_server_version: 6.4 - v62: - zabbix_server_version: 6.2 v60: zabbix_server_version: 6.0 - v50: - zabbix_server_version: 5.0 mysql: zabbix_server_dbname: zabbix zabbix_server_dbuser: zabbix-dbuser diff --git a/molecule/zabbix_web/molecule.yml b/molecule/zabbix_web/molecule.yml index 0aa3ab800..2b8b83bd4 100644 --- a/molecule/zabbix_web/molecule.yml +++ b/molecule/zabbix_web/molecule.yml @@ -38,12 +38,6 @@ provisioner: ansible_python_interpreter: /usr/bin/python3 python: ansible_python_interpreter: /usr/bin/python - v64: - zabbix_server_version: 6.4 - zabbix_web_version: 6.4 - v62: - zabbix_server_version: 6.2 - zabbix_web_version: 6.2 v60: zabbix_server_version: 6.0 zabbix_web_version: 6.0 diff --git a/roles/zabbix_agent/tasks/main.yml b/roles/zabbix_agent/tasks/main.yml index f5f87d18f..46f4f8e15 100644 --- a/roles/zabbix_agent/tasks/main.yml +++ b/roles/zabbix_agent/tasks/main.yml @@ -7,7 +7,7 @@ - name: Determine Latest Supported Zabbix Version ansible.builtin.set_fact: - zabbix_agent_version: "{{ zabbix_valid_agent_versions[ansible_distribution_major_version][0] | default(6.4) }}" + zabbix_agent_version: "{{ zabbix_valid_agent_versions[ansible_distribution_major_version][0] | default(6.0) }}" when: zabbix_agent_version is not defined or zabbix_agent_version is none tags: - always diff --git a/roles/zabbix_agent/templates/zabbix_agent2.conf.j2 b/roles/zabbix_agent/templates/zabbix_agent2.conf.j2 index ea60d032e..bb9b2ccd9 100644 --- a/roles/zabbix_agent/templates/zabbix_agent2.conf.j2 +++ b/roles/zabbix_agent/templates/zabbix_agent2.conf.j2 @@ -133,8 +133,6 @@ Plugins.{{ my_name }}.{{ param }}={{ value }} {% endfor %} {% endfor %} {% endif %} -{% if zabbix_agent_version is version('6.0', '>=') %} {% if zabbix_agent2_listenbacklog is defined and zabbix_agent2_listenbacklog %} ListenBacklog={{ zabbix_agent2_listenbacklog }} {% endif %} -{% endif %} diff --git a/roles/zabbix_agent/templates/zabbix_agentd.conf.j2 b/roles/zabbix_agent/templates/zabbix_agentd.conf.j2 index 24af45bc3..18a6e07e4 100644 --- a/roles/zabbix_agent/templates/zabbix_agentd.conf.j2 +++ b/roles/zabbix_agent/templates/zabbix_agentd.conf.j2 @@ -9,9 +9,7 @@ {% if ansible_os_family != "Windows" %} PidFile={{ zabbix_agent_pidfile }} {% endif %} -{% if zabbix_agent_version is version('3.0', '>=') %} LogType={{ zabbix_agent_logtype }} -{% endif %} {% if ansible_os_family == "Windows" %} LogFile={{ zabbix_agent_win_logfile }} {% else %} @@ -66,7 +64,7 @@ RefreshActiveChecks={{ zabbix_agent_refreshactivechecks }} BufferSend={{ zabbix_agent_buffersend }} BufferSize={{ zabbix_agent_buffersize }} MaxLinesPerSecond={{ zabbix_agent_maxlinespersecond }} -{% if zabbix_agent_version is version_compare('6.2', '>=') %} +{% if zabbix_agent_version is version_compare('6.0', '>') %} HeartbeatFrequency={{ zabbix_agent_heartbeatfrequency }} {% endif %} {% if zabbix_agent_zabbix_alias is defined and zabbix_agent_zabbix_alias %} @@ -96,11 +94,9 @@ Include={{ include }} {% endfor %} {% endif %} UnsafeUserParameters={{ zabbix_agent_unsafeuserparameters }} -{% if zabbix_agent_version is version_compare('2.2', '>=') %} {% if ansible_os_family != "Windows" %} LoadModulePath={{ zabbix_agent_loadmodulepath }} {% endif %} -{% endif %} {% if zabbix_agent_loadmodule is defined and zabbix_agent_loadmodule %} {% if zabbix_agent_loadmodule is string %} LoadModule={{ zabbix_agent_loadmodule }} @@ -142,8 +138,6 @@ TLSPSKIdentity={{ zabbix_agent_tlspskidentity }} TLSPSKFile={{ zabbix_agent_tlspskfile }} {% endif %} {% endif %} -{% if zabbix_agent_version is version('6.0', '>=') %} {% if zabbix_agent_listenbacklog is defined and zabbix_agent_listenbacklog %} ListenBacklog={{ zabbix_agent_listenbacklog }} {% endif %} -{% endif %} diff --git a/roles/zabbix_agent/vars/Debian.yml b/roles/zabbix_agent/vars/Debian.yml index 88e566fb4..4abeb8f46 100644 --- a/roles/zabbix_agent/vars/Debian.yml +++ b/roles/zabbix_agent/vars/Debian.yml @@ -9,38 +9,24 @@ zabbix_agent2_conf: zabbix_agent2.conf zabbix_valid_agent_versions: # Debian "12": - - 6.4 - - 6.2 - 6.0 "11": - - 6.4 - - 6.2 - 6.0 "10": - - 6.4 - - 6.2 - 6.0 "9": - - 6.4 - - 6.2 - 6.0 # Ubuntu "22": - - 6.4 - - 6.2 - 6.0 "20": - - 6.4 - - 6.2 - 6.0 "18": - - 6.4 - - 6.2 - 6.0 debian_keyring_path: /etc/apt/keyrings/ diff --git a/roles/zabbix_agent/vars/RedHat.yml b/roles/zabbix_agent/vars/RedHat.yml index 50f0b01ec..d78a658e8 100644 --- a/roles/zabbix_agent/vars/RedHat.yml +++ b/roles/zabbix_agent/vars/RedHat.yml @@ -8,14 +8,8 @@ zabbix_agent2_conf: zabbix_agent2.conf zabbix_valid_agent_versions: "9": - - 6.4 - - 6.2 - 6.0 "8": - - 6.4 - - 6.2 - 6.0 "7": - - 6.4 - - 6.2 - 6.0 diff --git a/roles/zabbix_agent/vars/Windows.yml b/roles/zabbix_agent/vars/Windows.yml index 4dd64ba02..6b33dd66a 100644 --- a/roles/zabbix_agent/vars/Windows.yml +++ b/roles/zabbix_agent/vars/Windows.yml @@ -2,6 +2,4 @@ # vars file for zabbix_agent (Windows) zabbix_valid_agent_versions: "10": - - 6.4 - - 6.2 - 6.0 diff --git a/roles/zabbix_javagateway/tasks/main.yml b/roles/zabbix_javagateway/tasks/main.yml index 6b56d43d3..a39442bfb 100644 --- a/roles/zabbix_javagateway/tasks/main.yml +++ b/roles/zabbix_javagateway/tasks/main.yml @@ -8,7 +8,7 @@ - name: Determine Latest Supported Zabbix Version ansible.builtin.set_fact: - zabbix_javagateway_version: "{{ zabbix_valid_javagateway_versions[ansible_distribution_major_version][0] | default(6.4) }}" + zabbix_javagateway_version: "{{ zabbix_valid_javagateway_versions[ansible_distribution_major_version][0] | default(6.0) }}" when: zabbix_javagateway_version is not defined tags: - always diff --git a/roles/zabbix_javagateway/vars/Debian.yml b/roles/zabbix_javagateway/vars/Debian.yml index 544e33094..c5c4f3510 100644 --- a/roles/zabbix_javagateway/vars/Debian.yml +++ b/roles/zabbix_javagateway/vars/Debian.yml @@ -1,28 +1,17 @@ zabbix_valid_javagateway_versions: # Debian "12": - - 6.4 - 6.0 "11": - - 6.4 - - 6.2 - 6.0 "10": - - 6.4 - - 6.2 - 6.0 # Ubuntu "22": - - 6.4 - - 6.2 - 6.0 "20": - - 6.4 - - 6.2 - 6.0 "18": - - 6.4 - - 6.2 - 6.0 debian_keyring_path: /etc/apt/keyrings/ diff --git a/roles/zabbix_javagateway/vars/RedHat.yml b/roles/zabbix_javagateway/vars/RedHat.yml index 62af028ff..f47237382 100644 --- a/roles/zabbix_javagateway/vars/RedHat.yml +++ b/roles/zabbix_javagateway/vars/RedHat.yml @@ -1,14 +1,8 @@ --- zabbix_valid_javagateway_versions: "9": - - 6.4 - - 6.2 - 6.0 "8": - - 6.4 - - 6.2 - 6.0 "7": - - 6.4 - - 6.2 - 6.0 diff --git a/roles/zabbix_proxy/tasks/Debian.yml b/roles/zabbix_proxy/tasks/Debian.yml index 07a26e16f..3e4720d0e 100644 --- a/roles/zabbix_proxy/tasks/Debian.yml +++ b/roles/zabbix_proxy/tasks/Debian.yml @@ -136,8 +136,6 @@ https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" register: zabbix_proxy_package_sql_installed until: zabbix_proxy_package_sql_installed is succeeded - when: - - zabbix_proxy_version is version('6.0', '>=') become: true tags: - install diff --git a/roles/zabbix_proxy/tasks/main.yml b/roles/zabbix_proxy/tasks/main.yml index ee19e04db..5af86a9c3 100644 --- a/roles/zabbix_proxy/tasks/main.yml +++ b/roles/zabbix_proxy/tasks/main.yml @@ -7,7 +7,7 @@ - name: Determine Latest Supported Zabbix Version ansible.builtin.set_fact: - zabbix_proxy_version: "{{ zabbix_valid_proxy_versions[ansible_distribution_major_version][0] | default(6.4) }}" + zabbix_proxy_version: "{{ zabbix_valid_proxy_versions[ansible_distribution_major_version][0] | default(6.0) }}" when: zabbix_proxy_version is not defined or zabbix_proxy_version is none tags: - always diff --git a/roles/zabbix_proxy/templates/zabbix_proxy.conf.j2 b/roles/zabbix_proxy/templates/zabbix_proxy.conf.j2 index 60ae3f0a5..797f779df 100644 --- a/roles/zabbix_proxy/templates/zabbix_proxy.conf.j2 +++ b/roles/zabbix_proxy/templates/zabbix_proxy.conf.j2 @@ -7,9 +7,7 @@ # https://www.zabbix.com/documentation/{{ zabbix_proxy_version }}/en/manual/appendix/config/zabbix_proxy {{ (zabbix_proxy_allowroot is defined and zabbix_proxy_allowroot is not none) | ternary('','# ') }}AllowRoot={{ zabbix_proxy_allowroot | default('') }} -{% if zabbix_proxy_version is version('6.0', '>=') %} {{ (zabbix_proxy_allowunsupporteddbversions is defined and zabbix_proxy_allowunsupporteddbversions is not none) | ternary('','# ') }}AllowUnsupportedDBVersions={{ zabbix_proxy_allowunsupporteddbversions | default('') }} -{% endif %} {{ (zabbix_proxy_cachesize is defined and zabbix_proxy_cachesize is not none) | ternary('','# ') }}CacheSize={{ zabbix_proxy_cachesize | default('') }} {{ (zabbix_proxy_configfrequency is defined and zabbix_proxy_configfrequency is not none) | ternary('','# ') }}ConfigFrequency={{ zabbix_proxy_configfrequency | default('') }} {{ (zabbix_proxy_datasenderfrequency is defined and zabbix_proxy_datasenderfrequency is not none) | ternary('','# ') }}DataSenderFrequency={{ zabbix_proxy_datasenderfrequency | default('') }} @@ -30,7 +28,7 @@ {{ (zabbix_proxy_externalscripts is defined and zabbix_proxy_externalscripts is not none) | ternary('','# ') }}ExternalScripts={{ zabbix_proxy_externalscripts | default('') }} {{ (zabbix_proxy_fping6location is defined and zabbix_proxy_fping6location is not none) | ternary('','# ') }}Fping6Location={{ zabbix_proxy_fping6location | default('') }} {{ (zabbix_proxy_fpinglocation is defined and zabbix_proxy_fpinglocation is not none) | ternary('','# ') }}FpingLocation={{ zabbix_proxy_fpinglocation | default('') }} -{% if zabbix_proxy_version is version('6.4', '<') %} +{% if zabbix_proxy_version is version('6.0', '==') %} {{ (zabbix_proxy_heartbeatfrequency is defined and zabbix_proxy_heartbeatfrequency is not none) | ternary('','# ') }}HeartbeatFrequency={{ zabbix_proxy_heartbeatfrequency | default('') }} {% endif %} {{ (zabbix_proxy_historycachesize is defined and zabbix_proxy_historycachesize is not none) | ternary('','# ') }}HistoryCacheSize={{ zabbix_proxy_historycachesize | default('') }} @@ -103,11 +101,11 @@ {{ (zabbix_proxy_unreachabledelay is defined and zabbix_proxy_unreachabledelay is not none) | ternary('','# ') }}UnreachableDelay={{ zabbix_proxy_unreachabledelay | default('') }} {{ (zabbix_proxy_unreachableperiod is defined and zabbix_proxy_unreachableperiod is not none) | ternary('','# ') }}UnreachablePeriod={{ zabbix_proxy_unreachableperiod | default('') }} {{ (zabbix_proxy_user is defined and zabbix_proxy_user is not none) | ternary('','# ') }}User={{ zabbix_proxy_user | default('') }} -{% if zabbix_proxy_version is version('6.2', '>=') %} +{% if zabbix_proxy_version is version('6.0', '>') %} {{ (zabbix_proxy_vault is defined and zabbix_proxy_vault is not none) | ternary('','# ') }}Vault={{ zabbix_proxy_vault | default('') }} {% endif %} {{ (zabbix_proxy_vaultdbpath is defined and zabbix_proxy_vaultdbpath is not none) | ternary('','# ') }}VaultDBPath={{ zabbix_proxy_vaultdbpath | default('') }} -{% if zabbix_proxy_version is version('6.2', '>=') %} +{% if zabbix_proxy_version is version('6.0', '>') %} {{ (zabbix_proxy_vaulttlscertfile is defined and zabbix_proxy_vaulttlscertfile is not none) | ternary('','# ') }}VaultTLSCertFile={{ zabbix_proxy_vaulttlscertfile | default('') }} {{ (zabbix_proxy_vaulttlskeyfile is defined and zabbix_proxy_vaulttlskeyfile is not none) | ternary('','# ') }}VaultTLSKeyFile={{ zabbix_proxy_vaulttlskeyfile | default('') }} {% endif %} diff --git a/roles/zabbix_server/tasks/Debian.yml b/roles/zabbix_server/tasks/Debian.yml index f268ef0e4..b8b0b7aec 100644 --- a/roles/zabbix_server/tasks/Debian.yml +++ b/roles/zabbix_server/tasks/Debian.yml @@ -170,8 +170,6 @@ https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" register: zabbix_server_package_sql_installed until: zabbix_server_package_sql_installed is succeeded - when: - - zabbix_server_version is version('5.4', '>=') become: true tags: - install diff --git a/roles/zabbix_server/tasks/RedHat.yml b/roles/zabbix_server/tasks/RedHat.yml index fefd7e86c..89f1a2246 100644 --- a/roles/zabbix_server/tasks/RedHat.yml +++ b/roles/zabbix_server/tasks/RedHat.yml @@ -70,8 +70,6 @@ https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" register: zabbix_server_sql_package_installed until: zabbix_server_sql_package_installed is succeeded - when: - - zabbix_server_version is version('6.0', '>=') become: true tags: - install diff --git a/roles/zabbix_server/tasks/mysql.yml b/roles/zabbix_server/tasks/mysql.yml index aad009816..f7a5b71be 100644 --- a/roles/zabbix_server/tasks/mysql.yml +++ b/roles/zabbix_server/tasks/mysql.yml @@ -60,16 +60,6 @@ tags: - database -- name: "MySQL | Get the file for create.sql" - ansible.builtin.shell: ls -1 {{ datafiles_path }}/{{ 'create' if zabbix_server_version is version('6.0', '<') else 'server' }}.sq* - changed_when: false - become: true - when: - - zabbix_server_database_sqlload | bool - register: ls_output_create - tags: - - database - - name: MySQL | Get current database version ansible.builtin.shell: | mysql -h {{ zabbix_server_dbhost }} -u{{ zabbix_server_dbuser }} \ @@ -136,53 +126,6 @@ tags: - database -- name: "MySQL | Fetch sql create file" - fetch: - src: "{{ ls_output_create.stdout }}" - dest: /tmp/{{ role_name }}/ - flat: true - become: true - when: - - delegated_dbhost != inventory_hostname - - zabbix_server_database_sqlload | bool - - mysql_schema_empty - tags: - - database - -- name: "MySQL | Copy sql create file" - ansible.builtin.copy: - src: /tmp/{{ role_name }}/ - dest: "{{ ls_output_create.stdout | dirname }}" - mode: "0640" - delegate_to: "{{ delegated_dbhost }}" - become: true - when: - - delegated_dbhost != inventory_hostname - - zabbix_server_database_sqlload | bool - - mysql_schema_empty - tags: - - database - -- name: "MySQL | Create database and import file" - community.mysql.mysql_db: - login_host: "{{ zabbix_server_mysql_login_host | default(omit) }}" - login_user: "{{ zabbix_server_dbuser if (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7') else zabbix_server_mysql_login_user }}" - login_password: "{{ zabbix_server_dbpassword if (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7') else zabbix_server_mysql_login_password }}" - login_port: "{{ zabbix_server_mysql_login_port | default(omit) }}" - login_unix_socket: "{{ zabbix_server_mysql_login_unix_socket | default(omit) }}" - name: "{{ zabbix_server_dbname }}" - encoding: "{{ zabbix_server_dbencoding }}" - collation: "{{ zabbix_server_dbcollation }}" - state: import - target: "{{ ls_output_create.stdout }}" - use_shell: "{{ true if zabbix_server_version is version('5.0', '==') else false }}" - when: - - zabbix_server_database_sqlload | bool - - mysql_schema_empty - delegate_to: "{{ delegated_dbhost }}" - tags: - - database - - name: "MySQL | Revert innodb_default_row_format to previous value" community.mysql.mysql_variables: variable: innodb_default_row_format diff --git a/roles/zabbix_server/templates/zabbix_server.conf.j2 b/roles/zabbix_server/templates/zabbix_server.conf.j2 index ac2264574..9473e81cf 100644 --- a/roles/zabbix_server/templates/zabbix_server.conf.j2 +++ b/roles/zabbix_server/templates/zabbix_server.conf.j2 @@ -103,14 +103,14 @@ {{ (zabbix_server_unreachableperiod is defined and zabbix_server_unreachableperiod is not none) | ternary('', '# ') }}UnreachablePeriod={{ zabbix_server_unreachableperiod | default('') }} {{ (zabbix_server_user is defined and zabbix_server_user is not none) | ternary('', '# ') }}User={{ zabbix_server_user | default('') }} {{ (zabbix_server_valuecachesize is defined and zabbix_server_valuecachesize is not none) | ternary('', '# ') }}ValueCacheSize={{ zabbix_server_valuecachesize | default('') }} -{% if zabbix_server_version is version('6.2', '>=') %} +{% if zabbix_server_version is version('6.0', '>') %} {{ (zabbix_server_vault is defined and zabbix_server_vault is not none) | ternary('', '# ') }}Vault={{ zabbix_server_vault | default('') }} {% endif %} -{% if zabbix_server_version is version('6.4', '>=') %} +{% if zabbix_server_version is version('6.0', '>') %} {{ (zabbix_server_connectors is defined and zabbix_server_connectors is not none) | ternary('', '# ') }}StartConnectors={{ zabbix_server_connectors | default('') }} {% endif %} {{ (zabbix_server_vaultdbpath is defined and zabbix_server_vaultdbpath is not none) | ternary('', '# ') }}VaultDBPath={{ zabbix_server_vaultdbpath | default('') }} -{% if zabbix_server_version is version('6.2', '>=') %} +{% if zabbix_server_version is version('6.0', '>') %} {{ (zabbix_server_vaulttlskeyfile is defined and zabbix_server_vaulttlskeyfile is not none) | ternary('', '# ') }}VaultTLSKeyFile={{ zabbix_server_vaulttlskeyfile | default('') }} {{ (zabbix_server_vaulttlscertfile is defined and zabbix_server_vaulttlscertfile is not none) | ternary('', '# ') }}VaultTLSCertFile={{ zabbix_server_vaulttlscertfile | default('') }} {% endif %} diff --git a/roles/zabbix_server/vars/Debian.yml b/roles/zabbix_server/vars/Debian.yml index 4c74370cb..a1e804cc5 100644 --- a/roles/zabbix_server/vars/Debian.yml +++ b/roles/zabbix_server/vars/Debian.yml @@ -8,24 +8,15 @@ mysql_create_dir: "" zabbix_valid_server_versions: # Debian "12": - - 6.4 - 6.0 "11": - - 6.4 - - 6.2 - 6.0 "10": - 6.0 # Ubuntu "22": - - 6.4 - - 6.2 - 6.0 "20": - - 6.4 - - 6.2 - - 6.0 - "18": - 6.0 debian_keyring_path: /etc/apt/keyrings/ diff --git a/roles/zabbix_server/vars/RedHat.yml b/roles/zabbix_server/vars/RedHat.yml index 923dba1fe..ef46ac2e6 100644 --- a/roles/zabbix_server/vars/RedHat.yml +++ b/roles/zabbix_server/vars/RedHat.yml @@ -10,12 +10,8 @@ __epel_repo: zabbix_valid_server_versions: "9": - - 6.4 - - 6.2 - 6.0 "8": - - 6.4 - - 6.2 - 6.0 pgsql_depenencies: diff --git a/roles/zabbix_web/handlers/main.yml b/roles/zabbix_web/handlers/main.yml index e97787b12..847a7d748 100644 --- a/roles/zabbix_web/handlers/main.yml +++ b/roles/zabbix_web/handlers/main.yml @@ -33,8 +33,6 @@ state: restarted enabled: true become: true - when: - - zabbix_web_version is version('5.0', '>=') - 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 diff --git a/roles/zabbix_web/vars/Debian.yml b/roles/zabbix_web/vars/Debian.yml index 0eaaee8b8..f47d74562 100644 --- a/roles/zabbix_web/vars/Debian.yml +++ b/roles/zabbix_web/vars/Debian.yml @@ -26,24 +26,15 @@ _nginx_tls_dhparam: /etc/ssl/private/dhparams.pem zabbix_valid_web_versions: # Debian "12": - - 6.4 - 6.0 "11": - - 6.4 - - 6.2 - 6.0 "10": - 6.0 # Ubuntu "22": - - 6.4 - - 6.2 - 6.0 "20": - - 6.4 - - 6.2 - - 6.0 - "18": - 6.0 debian_keyring_path: /etc/apt/keyrings/