diff --git a/.github/workflows/javagateway.yml b/.github/workflows/javagateway.yml index d93619314..f7a8b2fae 100644 --- a/.github/workflows/javagateway.yml +++ b/.github/workflows/javagateway.yml @@ -22,7 +22,6 @@ jobs: container: - rockylinux9 - rockylinux8 - - centos7 - ubuntu2404 - ubuntu2204 - ubuntu2004 @@ -32,10 +31,6 @@ jobs: - v64 - v62 - v60 - include: - - interpreter: python3 - - interpreter: python - container: centos7 exclude: - container: debian12 version: v62 @@ -79,5 +74,4 @@ jobs: MY_MOLECULE_IMAGE=${{ matrix.container }} MY_MOLECULE_VERSION=${{ matrix.version }} MY_MOLECULE_DOCKER_COMMAND=${{ matrix.command }} - MY_MOLECULE_INTERPRETER=${{ matrix.interpreter }} molecule test -s ${{ matrix.collection_role }} diff --git a/.github/workflows/proxy.yml b/.github/workflows/proxy.yml index b9f2695ac..f165ef204 100644 --- a/.github/workflows/proxy.yml +++ b/.github/workflows/proxy.yml @@ -22,7 +22,6 @@ jobs: container: - rockylinux9 - rockylinux8 - - centos7 - ubuntu2404 - ubuntu2204 - ubuntu2004 diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 79bfa6e4b..243d2da6d 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -39,8 +39,6 @@ jobs: - v64 - v62 - v60 - include: - - interpreter: python3 exclude: - container: ubuntu2404 version: v62 @@ -83,6 +81,5 @@ jobs: MY_MOLECULE_VERSION=${{ matrix.version }} MY_MOLECULE_DATABASE=${{ matrix.database }} MY_MOLECULE_WEB_SERVER=${{ matrix.web_server }} - MY_MOLECULE_INTERPRETER=${{ matrix.interpreter }} MY_MOLECULE_DOCKER_COMMAND=${{ matrix.command }} molecule test -s ${{ matrix.collection_role }} diff --git a/changelogs/fragments/remove_centos7.yml b/changelogs/fragments/remove_centos7.yml new file mode 100644 index 000000000..fbf1e65e3 --- /dev/null +++ b/changelogs/fragments/remove_centos7.yml @@ -0,0 +1,3 @@ +breaking_changes: + - All Roles - Remove support for Centos 7 + - All Roles - Remove support for Python2 diff --git a/docs/ZABBIX_AGENT_ROLE.md b/docs/ZABBIX_AGENT_ROLE.md index cfc4ef293..dcc7ed6ff 100644 --- a/docs/ZABBIX_AGENT_ROLE.md +++ b/docs/ZABBIX_AGENT_ROLE.md @@ -93,7 +93,6 @@ See the following list of supported Operating systems with the Zabbix releases: |---------------------|-----|-----|-----| | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | -| Red Hat Fam 7 | V | V | V | | Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | diff --git a/docs/ZABBIX_JAVAGATEWAY_ROLE.md b/docs/ZABBIX_JAVAGATEWAY_ROLE.md index fb4855453..149ae05b3 100644 --- a/docs/ZABBIX_JAVAGATEWAY_ROLE.md +++ b/docs/ZABBIX_JAVAGATEWAY_ROLE.md @@ -38,7 +38,6 @@ See the following list of supported Operating systems with the Zabbix releases. |---------------------|-----|-----|-----| | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | -| Red Hat Fam 7 | V | V | V | | Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | diff --git a/docs/ZABBIX_PROXY_ROLE.md b/docs/ZABBIX_PROXY_ROLE.md index f51cff41d..5aaeb36e5 100644 --- a/docs/ZABBIX_PROXY_ROLE.md +++ b/docs/ZABBIX_PROXY_ROLE.md @@ -81,7 +81,6 @@ See the following list of supported Operating systems with the Zabbix releases. |---------------------|-----|-----|-----| | Red Hat Fam 9 | V | V | V | | Red Hat Fam 8 | V | V | V | -| Red Hat Fam 7 | V | V | V | | Ubuntu 24.04 noble | V | | V | | Ubuntu 22.04 jammy | V | V | V | | Ubuntu 20.04 focal | V | V | V | diff --git a/molecule/zabbix_javagateway/molecule.yml b/molecule/zabbix_javagateway/molecule.yml index 0c6de4172..4e1a05ab2 100644 --- a/molecule/zabbix_javagateway/molecule.yml +++ b/molecule/zabbix_javagateway/molecule.yml @@ -14,7 +14,6 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:ro groups: - ${MY_MOLECULE_VERSION:-v64} - - ${MY_MOLECULE_INTERPRETER:-python3} provisioner: name: ansible env: @@ -22,10 +21,6 @@ provisioner: ANSIBLE_ROLES_PATH: $HOME/.ansible/collections/ansible_collections/community/zabbix/roles inventory: group_vars: - python3: - ansible_python_interpreter: /usr/bin/python3 - python: - ansible_python_interpreter: /usr/bin/python v64: zabbix_javagateway_version: 6.4 v62: diff --git a/molecule/zabbix_javagateway/prepare.yml b/molecule/zabbix_javagateway/prepare.yml index 3e3db6a1b..7949591d8 100644 --- a/molecule/zabbix_javagateway/prepare.yml +++ b/molecule/zabbix_javagateway/prepare.yml @@ -2,10 +2,6 @@ - name: Prepare hosts: all pre_tasks: - - name: "Set short version name" - ansible.builtin.set_fact: - zabbix_python_prefix: "python{% if ansible_python_version is version('3', '>=') %}3{% endif %}" - - name: "Installing packages on CentOS" ansible.builtin.yum: name: @@ -47,9 +43,9 @@ - net-tools - apt-utils - procps - - "{{ zabbix_python_prefix }}-pip" + - python3-pip - gpg-agent - - "{{ zabbix_python_prefix }}-apt" + - python3-apt - sudo - software-properties-common update_cache: true diff --git a/molecule/zabbix_proxy/molecule.yml b/molecule/zabbix_proxy/molecule.yml index 0002a0a49..128841a25 100644 --- a/molecule/zabbix_proxy/molecule.yml +++ b/molecule/zabbix_proxy/molecule.yml @@ -23,8 +23,6 @@ provisioner: ANSIBLE_ROLES_PATH: $HOME/.ansible/collections/ansible_collections/community/zabbix/roles inventory: group_vars: - all: - ansible_python_interpreter: /usr/bin/python3 v64: zabbix_proxy_version: 6.4 v62: diff --git a/molecule/zabbix_proxy/prepare.yml b/molecule/zabbix_proxy/prepare.yml index 5a3c3139f..1f03f59b8 100644 --- a/molecule/zabbix_proxy/prepare.yml +++ b/molecule/zabbix_proxy/prepare.yml @@ -36,10 +36,6 @@ - name: Prepare hosts: all tasks: - - name: "Set short version name" - ansible.builtin.set_fact: - zabbix_python_prefix: "python{% if ansible_python_version is version('3', '>=') %}3{% endif %}" - - name: "Create group for imaginary host" add_host: name: imaginary-host @@ -79,7 +75,7 @@ name: - net-tools - apt-utils - - "{{ zabbix_python_prefix }}-pip" + - python3-pip - gpg-agent - sudo - doc-base diff --git a/molecule/zabbix_server/molecule.yml b/molecule/zabbix_server/molecule.yml index 4638adfe2..ff7972ef7 100644 --- a/molecule/zabbix_server/molecule.yml +++ b/molecule/zabbix_server/molecule.yml @@ -22,8 +22,6 @@ provisioner: ANSIBLE_ROLES_PATH: $HOME/.ansible/collections/ansible_collections/community/zabbix/roles inventory: group_vars: - all: - ansible_python_interpreter: /usr/bin/python3 v64: zabbix_server_version: 6.4 v62: diff --git a/molecule/zabbix_web/molecule.yml b/molecule/zabbix_web/molecule.yml index 549b7ae16..135acf0e1 100644 --- a/molecule/zabbix_web/molecule.yml +++ b/molecule/zabbix_web/molecule.yml @@ -22,7 +22,6 @@ platforms: groups: - ${MY_MOLECULE_DATABASE:-mysql} - ${MY_MOLECULE_VERSION:-v64} - - ${MY_MOLECULE_INTERPRETER:-python3} - ${MY_MOLECULE_WEB_SERVER:-apache} provisioner: @@ -34,10 +33,6 @@ provisioner: group_vars: all: zabbix_api_server_url: zabbix-web-${MY_MOLECULE_VERSION:-v64}-${MY_MOLECULE_DATABASE:-mysql}-${MY_MOLECULE_CONTAINER:-rockylinux8} - python3: - ansible_python_interpreter: /usr/bin/python3 - python: - ansible_python_interpreter: /usr/bin/python v64: zabbix_server_version: 6.4 zabbix_web_version: 6.4 diff --git a/roles/zabbix_agent/molecule/with-server/Dockerfile.j2 b/roles/zabbix_agent/molecule/with-server/Dockerfile.j2 deleted file mode 100644 index e6aa95d30..000000000 --- a/roles/zabbix_agent/molecule/with-server/Dockerfile.j2 +++ /dev/null @@ -1,14 +0,0 @@ -# Molecule managed - -{% if item.registry is defined %} -FROM {{ item.registry.url }}/{{ item.image }} -{% else %} -FROM {{ item.image }} -{% endif %} - -RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ - elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ - elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi diff --git a/roles/zabbix_agent/molecule/with-server/INSTALL.rst b/roles/zabbix_agent/molecule/with-server/INSTALL.rst deleted file mode 100644 index 071b99565..000000000 --- a/roles/zabbix_agent/molecule/with-server/INSTALL.rst +++ /dev/null @@ -1,26 +0,0 @@ -******************************** -Docker driver installation guide -******************************** - -Requirements -============ - -* General molecule dependencies (see https://molecule.readthedocs.io/en/latest/installation.html) -* Docker Engine -* docker-py -* docker - -Install -======= - -Ansible < 2.6 - -.. code-block:: bash - - $ sudo pip install docker-py - -Ansible >= 2.6 - -.. code-block:: bash - - $ sudo pip install docker diff --git a/roles/zabbix_agent/molecule/with-server/molecule.yml b/roles/zabbix_agent/molecule/with-server/molecule.yml deleted file mode 100644 index 137eac314..000000000 --- a/roles/zabbix_agent/molecule/with-server/molecule.yml +++ /dev/null @@ -1,73 +0,0 @@ ---- -dependency: - name: galaxy -driver: - name: docker -platforms: - - name: zabbix-server-centos - image: milcom/centos7-systemd:latest - groups: - - zabbix_server - - mysql - privileged: true - networks: - - name: zabbix - published_ports: - - "80:80" - - name: zabbix-agent-centos - image: milcom/centos7-systemd:latest - groups: - - zabbix_agent - privileged: true - networks: - - name: zabbix - - name: zabbix-agent-debian - image: minimum2scp/systemd-stretch:latest - command: /sbin/init - groups: - - zabbix_agent - privileged: true - networks: - - name: zabbix - - name: zabbix-agent-ubuntu - image: solita/ubuntu-systemd:bionic - groups: - - zabbix_agent - privileged: true - networks: - - name: zabbix - -provisioner: - name: ansible - playbooks: - docker: - create: ../default/create.yml - destroy: ../default/destroy.yml - inventory: - group_vars: - all: - zabbix_api_create_hosts: true - zabbix_api_create_hostgroup: true - zabbix_api_server_url: http://zabbix-server-centos - zabbix_apache_servername: zabbix-server-centos - mysql: - zabbix_server_database: mysql - zabbix_server_database_long: mysql - zabbix_server_dbport: 3306 - database_type: mysql - database_type_long: mysql - host_vars: - zabbix-agent-fedora: - ansible_python_interpreter: /usr/bin/python3 - zabbix-agent-ubuntu: - zabbix_agent_tlsaccept: psk - zabbix_agent_tlsconnect: psk - zabbix_agent_tlspskidentity: "myhost PSK" - zabbix_agent_tlspsk_secret: b7e3d380b9d400676d47198ecf3592ccd4795a59668aa2ade29f0003abbbd40d - zabbix_agent_tlspskfile: /etc/zabbix/zabbix_agent_pskfile.psk - -scenario: - name: with-server - -verifier: - name: testinfra diff --git a/roles/zabbix_agent/molecule/with-server/playbook.yml b/roles/zabbix_agent/molecule/with-server/playbook.yml deleted file mode 100644 index 2f0795448..000000000 --- a/roles/zabbix_agent/molecule/with-server/playbook.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: Converge - hosts: all:!zabbix_server - pre_tasks: - - name: "Get IP Server" - ansible.builtin.shell: grep $(hostname) /etc/hosts | awk '{ print $1 }' | tail -n 1 - register: ip_address - delegate_to: zabbix-server-centos - changed_when: false - tags: - - skip_ansible_lint - - - name: "Get IP hosts" - ansible.builtin.shell: grep $(hostname) /etc/hosts | awk '{ print $1 }' | tail -n 1 - register: ip_address_host - changed_when: false - tags: - - skip_ansible_lint - - roles: - - role: zabbix_agent - zabbix_agent_ip: "{{ ip_address_host.stdout }}" - zabbix_agent_server: "{{ ip_address.stdout }}" - zabbix_agent_serveractive: "{{ ip_address.stdout }}" diff --git a/roles/zabbix_agent/molecule/with-server/prepare.yml b/roles/zabbix_agent/molecule/with-server/prepare.yml deleted file mode 100644 index e95cc9ad7..000000000 --- a/roles/zabbix_agent/molecule/with-server/prepare.yml +++ /dev/null @@ -1,115 +0,0 @@ ---- -- name: Prepare - hosts: zabbix_server - pre_tasks: - - name: "Installing EPEL" - ansible.builtin.yum: - name: - - epel-release - state: present - when: ansible_distribution == 'CentOS' - - - name: "Installing packages" - ansible.builtin.yum: - name: - - net-tools - - which - - libselinux-python - - python-pip - state: present - register: installation_dependencies - when: ansible_distribution == 'CentOS' - - - name: "Installing which on NON-CentOS" - ansible.builtin.apt: - name: - - net-tools - - python-pip - - curl - state: present - when: ansible_distribution != 'CentOS' - - - name: "Configure SUDO." - ansible.builtin.lineinfile: - dest: /etc/sudoers - line: "Defaults !requiretty" - state: present - - - name: "Make sure the docs are installed." - ansible.builtin.lineinfile: - dest: /etc/yum.conf - line: "tsflags=nodocs" - state: absent - - - name: "Installing some python dependencies" - ansible.builtin.pip: - name: py-zabbix - state: present - - roles: - - role: geerlingguy.mysql - - role: zabbix_server - - role: zabbix_web - -- name: Prepare - hosts: all:!zabbix_server:!docker - tasks: - - name: "Installing packages on CentOS family" - ansible.builtin.yum: - name: - - net-tools - - which - state: present - when: - - ansible_os_family == 'RedHat' - - - name: "Installing packages on Debian family" - ansible.builtin.apt: - name: - - net-tools - state: present - when: - - ansible_os_family == 'Debian' - -- name: Converge - hosts: docker - tasks: - - name: "Download Docker CE repo file" - when: not ansible_check_mode # Because get_url always has changed status in check_mode. - ansible.builtin.get_url: - url: https://download.docker.com/linux/centos/docker-ce.repo - dest: /etc/yum.repos.d/docker-ce.repo - mode: 0644 - register: zabbix_agent_prepare_docker_repo - until: zabbix_agent_prepare_docker_repo is succeeded - - - name: "Installing Epel" - ansible.builtin.package: - pkg: - - epel-release - state: present - register: zabbix_agent_prepare_docker_install - until: zabbix_agent_prepare_docker_install is succeeded - - - name: "Installing Docker" - ansible.builtin.package: - pkg: - - docker-ce - - python-pip - - python-setuptools - state: present - register: zabbix_agent_prepare_docker_install - until: zabbix_agent_prepare_docker_install is succeeded - - - name: "Installing Docker Python" - ansible.builtin.pip: - name: - - docker - state: present - register: zabbix_agent_prepare_docker_install - until: zabbix_agent_prepare_docker_install is succeeded - - - name: "Starting Docker service" - ansible.builtin.service: - name: docker - state: started diff --git a/roles/zabbix_agent/molecule/with-server/requirements.yml b/roles/zabbix_agent/molecule/with-server/requirements.yml deleted file mode 100644 index da9d004bc..000000000 --- a/roles/zabbix_agent/molecule/with-server/requirements.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- src: geerlingguy.apache -- src: geerlingguy.mysql -- src: dj-wasabi.zabbix-server -- src: dj-wasabi.zabbix-web diff --git a/roles/zabbix_agent/molecule/with-server/tests/test_agent.py b/roles/zabbix_agent/molecule/with-server/tests/test_agent.py deleted file mode 100644 index 5f373ca89..000000000 --- a/roles/zabbix_agent/molecule/with-server/tests/test_agent.py +++ /dev/null @@ -1,44 +0,0 @@ -import os -from zabbix_api import ZabbixAPI - -import testinfra.utils.ansible_runner - -testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('zabbix_agent') - - -def authenticate(): - zapi = ZabbixAPI(server='http://zabbix-server-centos/api_jsonrpc.php') - zapi.login("Admin", "zabbix") - return zapi - - -def test_psk_host(host): - zapi = authenticate() - hostname = host.check_output('hostname -s') - host_name = "zabbix-agent-ubuntu" - - server_data = zapi.host.get({'output': 'extend', 'selectInventory': 'extend', 'filter': {'host': [hostname]}}) - - if hostname == host_name: - assert server_data[0]['tls_psk'] == "b7e3d380b9d400676d47198ecf3592ccd4795a59668aa2ade29f0003abbbd40d" - assert server_data[0]['tls_psk_identity'] == "myhost PSK" - assert server_data[0]['tls_accept'] == "2" - else: - assert server_data[0]['tls_psk'] == "" - assert server_data[0]['tls_psk_identity'] == "" - assert server_data[0]['tls_accept'] == "1" - - -def test_zabbix_agent_psk(host): - hostname = host.check_output('hostname -s') - host_name = "zabbix-agent-ubuntu" - - psk_file = host.file("/etc/zabbix/zabbix_agent_pskfile.psk") - if hostname == host_name: - assert psk_file.user == "zabbix" - assert psk_file.group == "zabbix" - assert psk_file.mode == 0o400 - assert psk_file.contains("b7e3d380b9d400676d47198ecf3592ccd4795a59668aa2ade29f0003abbbd40d") - else: - assert not psk_file.exists diff --git a/roles/zabbix_agent/molecule/with-server/tests/test_default.py b/roles/zabbix_agent/molecule/with-server/tests/test_default.py deleted file mode 100644 index cbedaa170..000000000 --- a/roles/zabbix_agent/molecule/with-server/tests/test_default.py +++ /dev/null @@ -1,41 +0,0 @@ -import os -from zabbix_api import ZabbixAPI - -import testinfra.utils.ansible_runner - -testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('zabbix_server') - - -def authenticate(): - zapi = ZabbixAPI(server='http://zabbix-server-centos/api_jsonrpc.php') - zapi.login("Admin", "zabbix") - return zapi - - -def get_hosts(): - return [ - "zabbix-agent-debian", - "zabbix-agent-ubuntu", - "zabbix-agent-centos", - "zabbix-agent-docker-centos" - ] - - -def test_hosts(): - zapi = authenticate() - hosts = get_hosts() - servers = zapi.host.get({'output': ["hostid", "name"]}) - - for server in servers: - if server['name'] != 'Zabbix server': - assert server['name'] in hosts - - -def test_hosts_status(): - zapi = authenticate() - servers = zapi.host.get({'output': ["status", "name"]}) - - for server in servers: - if server['name'] != 'Zabbix server': - assert int(server['status']) == 0 diff --git a/roles/zabbix_agent/tasks/selinux.yml b/roles/zabbix_agent/tasks/selinux.yml index 21e176db6..f82072d68 100644 --- a/roles/zabbix_agent/tasks/selinux.yml +++ b/roles/zabbix_agent/tasks/selinux.yml @@ -18,22 +18,6 @@ tags: - install -- name: "SELinux | RedHat | Install policycoreutils-python" - ansible.builtin.package: - name: policycoreutils-python - state: installed - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: zabbix_agent_policycoreutils_installed - until: zabbix_agent_policycoreutils_installed is succeeded - when: - - ansible_os_family == "RedHat" - - ansible_distribution_major_version == "7" - become: true - tags: - - install - - name: "SELinux | RedHat | Install python3-policycoreutils on RHEL8" ansible.builtin.package: name: python3-policycoreutils diff --git a/roles/zabbix_agent/vars/RedHat.yml b/roles/zabbix_agent/vars/RedHat.yml index d4e6c6e3b..7c807652e 100644 --- a/roles/zabbix_agent/vars/RedHat.yml +++ b/roles/zabbix_agent/vars/RedHat.yml @@ -12,7 +12,3 @@ zabbix_valid_agent_versions: - 6.4 - 6.2 - 6.0 - "7": - - 6.4 - - 6.2 - - 6.0 diff --git a/roles/zabbix_proxy/tasks/RedHat.yml b/roles/zabbix_proxy/tasks/RedHat.yml index a51baee63..a3dddcec2 100644 --- a/roles/zabbix_proxy/tasks/RedHat.yml +++ b/roles/zabbix_proxy/tasks/RedHat.yml @@ -34,11 +34,6 @@ tags: - install -- name: "RedHat | Add EPEL Repo (Centos 7 Only)" - when: ansible_facts['distribution_major_version'] == '7' - ansible.builtin.yum: - name: epel-release - - name: "Configure SELinux when enabled" ansible.builtin.include_tasks: selinux.yml when: diff --git a/roles/zabbix_proxy/tasks/initialize-mysql.yml b/roles/zabbix_proxy/tasks/initialize-mysql.yml index e3b525a83..35da77ecb 100644 --- a/roles/zabbix_proxy/tasks/initialize-mysql.yml +++ b/roles/zabbix_proxy/tasks/initialize-mysql.yml @@ -58,7 +58,6 @@ password: "{{ zabbix_proxy_dbpassword }}" priv: "{{ zabbix_proxy_dbname }}.*:ALL" host: "{{ zabbix_proxy_privileged_host }}" - plugin: "{{ 'mysql_native_password' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7') else omit }}" state: present - name: "MySQL verify or create schema" @@ -73,7 +72,7 @@ login_host: "{{ zabbix_proxy_dbhost }}" login_port: "{{ zabbix_proxy_dbport }}" login_db: "{{ zabbix_proxy_dbname }}" - query: 'SELECT mandatory FROM dbversion' + query: "SELECT mandatory FROM dbversion" rescue: - name: "MySQL | Get and set schema import overrides" delegate_to: "{{ zabbix_proxy_real_dbhost | default(zabbix_proxy_dbhost_run_install | ternary(delegated_dbhost, inventory_hostname)) }}" diff --git a/roles/zabbix_proxy/vars/Debian.yml b/roles/zabbix_proxy/vars/Debian.yml index 759396d07..2b1b58caf 100644 --- a/roles/zabbix_proxy/vars/Debian.yml +++ b/roles/zabbix_proxy/vars/Debian.yml @@ -34,7 +34,7 @@ _zabbix_proxy_mysql_dependencies: # Ubuntu "24": - default-mysql-client - - "{{ zabbix_python_prefix }}-mysqldb" + - python3-mysqldb "22": - default-mysql-client - python3-pymysql @@ -45,9 +45,6 @@ _zabbix_proxy_mysql_dependencies: _zabbix_proxy_sqlite3_dependencies: - sqlite3 -mysql_plugin: - "10": mysql_native_password - debian_keyring_path: /etc/apt/keyrings/ zabbix_gpg_key: "{{ debian_keyring_path }}zabbix-repo.asc" _zabbix_proxy_fping6location: /usr/bin/fping6 diff --git a/roles/zabbix_proxy/vars/RedHat.yml b/roles/zabbix_proxy/vars/RedHat.yml index 6a22ec36d..04900934e 100644 --- a/roles/zabbix_proxy/vars/RedHat.yml +++ b/roles/zabbix_proxy/vars/RedHat.yml @@ -7,10 +7,6 @@ zabbix_valid_proxy_versions: - 6.4 - 6.2 - 6.0 - "7": - - 6.4 - - 6.2 - - 6.0 _zabbix_proxy_pgsql_dependencies: - "{{ zabbix_proxy_install_database_client | ternary('postgresql', '') }}" @@ -23,10 +19,6 @@ _zabbix_proxy_mysql_dependencies: "8": - "{{ zabbix_proxy_install_database_client | ternary('mysql', '') }}" - python3-PyMySQL - "7": - - "{{ zabbix_proxy_install_database_client | ternary('mariadb', '') }}" - - python3-PyMySQL - - python36-cryptography _zabbix_proxy_sqlite3_dependencies: - sqlite @@ -45,9 +37,6 @@ selinux_pkgs: - libsemanage-python - checkpolicy -mysql_plugin: - "7": mysql_native_password - _zabbix_proxy_fping6location: /usr/sbin/fping6 _zabbix_proxy_fpinglocation: /usr/sbin/fping diff --git a/roles/zabbix_server/tasks/initialize-mysql.yml b/roles/zabbix_server/tasks/initialize-mysql.yml index 2679fb8c7..745884cd1 100644 --- a/roles/zabbix_server/tasks/initialize-mysql.yml +++ b/roles/zabbix_server/tasks/initialize-mysql.yml @@ -46,7 +46,6 @@ name: "{{ zabbix_server_dbuser }}" password: "{{ zabbix_server_dbpassword }}" host: "{{ zabbix_server_privileged_host }}" - plugin: "{{ 'mysql_native_password' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7') else omit }}" priv: "{{ zabbix_server_dbname }}.*:ALL" state: present diff --git a/roles/zabbix_web/tasks/Debian.yml b/roles/zabbix_web/tasks/Debian.yml index d3c12fdac..4ddab341b 100644 --- a/roles/zabbix_web/tasks/Debian.yml +++ b/roles/zabbix_web/tasks/Debian.yml @@ -9,7 +9,6 @@ ansible.builtin.set_fact: zabbix_short_version: "{{ zabbix_web_version | regex_replace('\\.', '') }}" zabbix_underscore_version: "{{ zabbix_web_version | regex_replace('\\.', '_') }}" - zabbix_python_prefix: "python{% if ansible_python_version is version('3', '>=') %}3{% endif %}" tags: - always @@ -61,7 +60,7 @@ (ansible_distribution == "Debian" and ansible_distribution_major_version < "12") - name: "Debian | Download gpg key" - when: not ansible_check_mode # Because get_url always has changed status in check_mode. + when: not ansible_check_mode # Because get_url always has changed status in check_mode. ansible.builtin.get_url: url: "{{ zabbix_repo_deb_gpg_key_url }}" dest: "{{ zabbix_gpg_key }}" diff --git a/roles/zabbix_web/tasks/selinux.yml b/roles/zabbix_web/tasks/selinux.yml index df5d388db..35fc904be 100644 --- a/roles/zabbix_web/tasks/selinux.yml +++ b/roles/zabbix_web/tasks/selinux.yml @@ -1,22 +1,4 @@ --- -- name: "SELinux | RedHat | Install related SELinux package" - ansible.builtin.yum: - name: - - libsemanage-python - state: present - environment: - http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" - https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" - register: zabbix_web_dependencies_installed - until: zabbix_web_dependencies_installed is succeeded - become: true - when: - - ansible_os_family == "RedHat" - - ansible_selinux.status == "enabled" - - ansible_distribution_major_version == "7" or ansible_distribution_major_version == "6" - tags: - - install - - name: "SELinux | RedHat | Install related SELinux package on RHEL9 and RHEL8" ansible.builtin.yum: name: @@ -31,7 +13,6 @@ when: - ansible_os_family == "RedHat" - ansible_selinux.status == "enabled" - - ansible_distribution_major_version|int >= 8 tags: - install