From 7e8a9e3ed4cf39729ed64de54d24ce6707d5a427 Mon Sep 17 00:00:00 2001 From: Troy W Date: Sun, 24 Sep 2023 22:44:20 -0400 Subject: [PATCH] Move to deb822 formatting and allow debian repo selection (#1090) --- changelogs/fragments/deb822.yml | 3 ++ docs/ZABBIX_AGENT_ROLE.md | 2 + docs/ZABBIX_JAVAGATEWAY_ROLE.md | 2 + docs/ZABBIX_PROXY_ROLE.md | 2 + docs/ZABBIX_SERVER_ROLE.md | 2 + docs/ZABBIX_WEB_ROLE.md | 2 + roles/zabbix_agent/defaults/main.yml | 2 + roles/zabbix_agent/tasks/Debian.yml | 36 ++++++++---------- roles/zabbix_agent/vars/Debian.yml | 1 + roles/zabbix_javagateway/defaults/main.yml | 2 + roles/zabbix_javagateway/tasks/Debian.yml | 43 +++++++++------------- roles/zabbix_javagateway/vars/Debian.yml | 1 + roles/zabbix_proxy/defaults/main.yml | 1 + roles/zabbix_proxy/tasks/Debian.yml | 29 +++++++++++---- roles/zabbix_proxy/vars/Debian.yml | 1 + roles/zabbix_server/defaults/main.yml | 1 + roles/zabbix_server/tasks/Debian.yml | 37 ++++++++----------- roles/zabbix_server/vars/Debian.yml | 1 + roles/zabbix_web/defaults/main.yml | 1 + roles/zabbix_web/tasks/Debian.yml | 37 ++++++++----------- roles/zabbix_web/vars/Debian.yml | 1 + 21 files changed, 113 insertions(+), 94 deletions(-) create mode 100644 changelogs/fragments/deb822.yml diff --git a/changelogs/fragments/deb822.yml b/changelogs/fragments/deb822.yml new file mode 100644 index 000000000..5e29ba5c7 --- /dev/null +++ b/changelogs/fragments/deb822.yml @@ -0,0 +1,3 @@ +minor_changes: + - all roles - Updated Debian repository format to 822 standard + - all roles - Re-added ability to override Debian repo source diff --git a/docs/ZABBIX_AGENT_ROLE.md b/docs/ZABBIX_AGENT_ROLE.md index 660ec9262..aa73fab3a 100644 --- a/docs/ZABBIX_AGENT_ROLE.md +++ b/docs/ZABBIX_AGENT_ROLE.md @@ -134,6 +134,8 @@ The following is an overview of all available configuration default for this rol * `zabbix_repo_yum`: A list with Yum repository configuration. * `zabbix_repo_yum_schema`: Default: `https`. Option to change the web schema for the yum repository(http/https) * `zabbix_agent_disable_repo`: A list of repos to disable during install. Default `epel`. +* `zabbix_repo_deb_url`: The URL to the Zabbix repository. Default `http://repo.zabbix.com/zabbix/{{ zabbix_agent_version }}/{{ ansible_distribution.lower() }}` +* `zabbix_repo_deb_component`: The repository component for Debian installs. Default `main`. ### SElinux diff --git a/docs/ZABBIX_JAVAGATEWAY_ROLE.md b/docs/ZABBIX_JAVAGATEWAY_ROLE.md index f0341680a..1761c7f8b 100644 --- a/docs/ZABBIX_JAVAGATEWAY_ROLE.md +++ b/docs/ZABBIX_JAVAGATEWAY_ROLE.md @@ -60,6 +60,8 @@ The `zabbix_javagateway_version` is optional. The latest available major.minor v * `zabbix_javagateway_disable_repo`: A list of repos to disable during install. Default `epel`. * `zabbix_javagateway_package_state`: Default: `present`. Can be overridden to `latest` to update packages when needed. * `zabbix_javagateway_conf_mode`: Default: `0644`. The "mode" for the Zabbix configuration file. +* `zabbix_repo_deb_url`: The URL to the Zabbix repository. Default `http://repo.zabbix.com/zabbix/{{ zabbix_agent_version }}/{{ ansible_distribution.lower() }}` +* `zabbix_repo_deb_component`: The repository component for Debian installs. Default `main`. ### Java Gatewaty diff --git a/docs/ZABBIX_PROXY_ROLE.md b/docs/ZABBIX_PROXY_ROLE.md index 8a61a9915..8ffb81628 100644 --- a/docs/ZABBIX_PROXY_ROLE.md +++ b/docs/ZABBIX_PROXY_ROLE.md @@ -130,6 +130,8 @@ The following is an overview of all available configuration default for this rol * `zabbix_proxy_disable_repo`: A list of repos to disable during install. Default `epel`. * `zabbix_proxy_apt_priority`: APT priority for the zabbix repository * `*zabbix_proxy_package_state`: Default: `present`. Can be overridden to `latest` to update packages +* `zabbix_repo_deb_url`: The URL to the Zabbix repository. Default `http://repo.zabbix.com/zabbix/{{ zabbix_proxy_version }}/{{ ansible_distribution.lower() }}` +* `zabbix_repo_deb_component`: The repository component for Debian installs. Default `main`. ### SElinux * `zabbix_proxy_selinux`: Default: `False`. Enables an SELinux policy so that the Proxy will run. diff --git a/docs/ZABBIX_SERVER_ROLE.md b/docs/ZABBIX_SERVER_ROLE.md index 9d418e798..d7571bcb7 100644 --- a/docs/ZABBIX_SERVER_ROLE.md +++ b/docs/ZABBIX_SERVER_ROLE.md @@ -107,6 +107,8 @@ The following is an overview of all available configuration default for this rol * `zabbix_server_disable_repo`: A list of repos to disable during install. Default `epel`. * `zabbix_service_state`: Default: `started`. Can be overridden to stopped if needed * `zabbix_service_enabled`: Default: `True` Can be overridden to `False` if needed +* `zabbix_repo_deb_url`: The URL to the Zabbix repository. Default `http://repo.zabbix.com/zabbix/{{ zabbix_server_version }}/{{ ansible_distribution.lower() }}` +* `zabbix_repo_deb_component`: The repository component for Debian installs. Default `main`. ### SElinux diff --git a/docs/ZABBIX_WEB_ROLE.md b/docs/ZABBIX_WEB_ROLE.md index c4bbb4c90..f10a90f0e 100644 --- a/docs/ZABBIX_WEB_ROLE.md +++ b/docs/ZABBIX_WEB_ROLE.md @@ -92,6 +92,8 @@ The following is an overview of all available configuration defaults for this ro * `zabbix_web_package_state`: Default: `present`. Can be overridden to `latest` to update packages when needed. * `zabbix_web_doubleprecision`: Default: `False`. For upgraded installations, please read database [upgrade notes](https://www.zabbix.com/documentation/current/manual/installation/upgrade_notes_500) (Paragraph "Enabling extended range of numeric (float) values") before enabling this option. * `zabbix_web_conf_mode`: Default: `0644`. The "mode" for the Zabbix configuration file. +* `zabbix_repo_deb_url`: The URL to the Zabbix repository. Default `http://repo.zabbix.com/zabbix/{{ zabbix_web_version }}/{{ ansible_distribution.lower() }}` +* `zabbix_repo_deb_component`: The repository component for Debian installs. Default `main`. ### Zabbix Web specific diff --git a/roles/zabbix_agent/defaults/main.yml b/roles/zabbix_agent/defaults/main.yml index fe10388fd..dbd5db5db 100644 --- a/roles/zabbix_agent/defaults/main.yml +++ b/roles/zabbix_agent/defaults/main.yml @@ -66,6 +66,8 @@ zabbix_repo_yum: gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX state: present +zabbix_repo_deb_component: main + # Zabbix API stuff zabbix_api_server_host: localhost # zabbix_api_server_port: 80 diff --git a/roles/zabbix_agent/tasks/Debian.yml b/roles/zabbix_agent/tasks/Debian.yml index 229a3ab19..b0bd2d072 100644 --- a/roles/zabbix_agent/tasks/Debian.yml +++ b/roles/zabbix_agent/tasks/Debian.yml @@ -4,26 +4,15 @@ - name: "Debian | Set some variables" ansible.builtin.set_fact: zabbix_short_version: "{{ zabbix_agent_version | regex_replace('\\.', '') }}" - zabbix_agent_apt_repository: - - "http://repo.zabbix.com/zabbix/{{ zabbix_agent_version }}/{{ ansible_distribution.lower() }}/" - - "{{ ansible_distribution_release }}" - - "main" zabbix_underscore_version: "{{ zabbix_agent_version | regex_replace('\\.', '_') }}" - when: - - ansible_machine != "aarch64" tags: - always -- name: "Debian | Set some variables" +- name: "Debian | Repo URL" ansible.builtin.set_fact: - zabbix_short_version: "{{ zabbix_agent_version | regex_replace('\\.', '') }}" - zabbix_agent_apt_repository: - - "http://repo.zabbix.com/zabbix/{{ zabbix_agent_version }}/{{ ansible_distribution.lower() }}-arm64/" - - "{{ ansible_distribution_release }}" - - "main" - zabbix_underscore_version: "{{ zabbix_agent_version | regex_replace('\\.', '_') }}" + zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}{{ '-arm64' if ansible_machine == 'aarch64' else ''}}" when: - - ansible_machine == "aarch64" + - zabbix_repo_deb_url is undefined tags: - always @@ -70,13 +59,20 @@ - install - name: "Debian | Installing repository {{ ansible_distribution }}" - ansible.builtin.apt_repository: - repo: "{{ item }} [signed-by={{ zabbix_gpg_key }}] {{ zabbix_agent_apt_repository | join(' ') }}" - state: present + ansible.builtin.copy: + dest: /etc/apt/sources.list.d/zabbix.sources + owner: root + group: root + mode: 0644 + content: | + Types: deb deb-src + Enabled: yes + URIs: {{ zabbix_repo_deb_url }} + Suites: {{ ansible_distribution_release }} + Components: {{ zabbix_repo_deb_component }} + Architectures: {{ 'amd64' if ansible_machine != 'aarch64' else 'arm64'}} + Signed-By: {{ zabbix_gpg_key }} become: true - with_items: - - deb-src - - deb tags: - install diff --git a/roles/zabbix_agent/vars/Debian.yml b/roles/zabbix_agent/vars/Debian.yml index 6eb47215d..88e566fb4 100644 --- a/roles/zabbix_agent/vars/Debian.yml +++ b/roles/zabbix_agent/vars/Debian.yml @@ -45,3 +45,4 @@ zabbix_valid_agent_versions: debian_keyring_path: /etc/apt/keyrings/ zabbix_gpg_key: "{{ debian_keyring_path }}/zabbix-official-repo.asc" +_zabbix_repo_deb_url: "http://repo.zabbix.com/zabbix/{{ zabbix_agent_version }}/{{ ansible_distribution.lower() }}" diff --git a/roles/zabbix_javagateway/defaults/main.yml b/roles/zabbix_javagateway/defaults/main.yml index fa84b612e..4356f61a4 100644 --- a/roles/zabbix_javagateway/defaults/main.yml +++ b/roles/zabbix_javagateway/defaults/main.yml @@ -25,6 +25,8 @@ zabbix_repo_yum: gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX state: present +zabbix_repo_deb_component: main + 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/Debian.yml b/roles/zabbix_javagateway/tasks/Debian.yml index fbaa5c3c7..e60dee8fa 100644 --- a/roles/zabbix_javagateway/tasks/Debian.yml +++ b/roles/zabbix_javagateway/tasks/Debian.yml @@ -5,27 +5,13 @@ tags: - always -- name: "Debian | Set some variables" +- name: "Debian | Repo URL" ansible.builtin.set_fact: - zabbix_javagateway_apt_repository: - - "http://repo.zabbix.com/zabbix/{{ zabbix_javagateway_version }}/{{ ansible_distribution.lower() }}/" - - "{{ ansible_distribution_release }}" - - "main" + zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}{{ '-arm64' if ansible_machine == 'aarch64' else ''}}" when: - - ansible_machine != "aarch64" + - zabbix_repo_deb_url is undefined tags: - - install - -- name: "Debian | Set some variables" - ansible.builtin.set_fact: - zabbix_javagateway_apt_repository: - - "http://repo.zabbix.com/zabbix/{{ zabbix_javagateway_version }}/{{ ansible_distribution.lower() }}-arm64/" - - "{{ ansible_distribution_release }}" - - "main" - when: - - ansible_machine == "aarch64" - tags: - - install + - always # In releases older than Debian 12 and Ubuntu 22.04, /etc/apt/keyrings does not exist by default. # It SHOULD be created with permissions 0755 if it is needed and does not already exist. @@ -50,14 +36,21 @@ tags: - install -- name: "Debian | Installing repository Debian" - ansible.builtin.apt_repository: - repo: "{{ item }} [signed-by={{ zabbix_gpg_key }}] {{ zabbix_javagateway_apt_repository | join(' ') }}" - state: present +- name: "Debian | Installing repository {{ ansible_distribution }}" + ansible.builtin.copy: + dest: /etc/apt/sources.list.d/zabbix.sources + owner: root + group: root + mode: 0644 + content: | + Types: deb deb-src + Enabled: yes + URIs: {{ zabbix_repo_deb_url }} + Suites: {{ ansible_distribution_release }} + Components: {{ zabbix_repo_deb_component }} + Architectures: {{ 'amd64' if ansible_machine != 'aarch64' else 'arm64'}} + Signed-By: {{ zabbix_gpg_key }} become: true - with_items: - - deb-src - - deb tags: - install diff --git a/roles/zabbix_javagateway/vars/Debian.yml b/roles/zabbix_javagateway/vars/Debian.yml index 9cc34f965..544e33094 100644 --- a/roles/zabbix_javagateway/vars/Debian.yml +++ b/roles/zabbix_javagateway/vars/Debian.yml @@ -27,3 +27,4 @@ zabbix_valid_javagateway_versions: debian_keyring_path: /etc/apt/keyrings/ zabbix_gpg_key: "{{ debian_keyring_path }}/zabbix-official-repo.asc" +_zabbix_repo_deb_url: "http://repo.zabbix.com/zabbix/{{ zabbix_javagateway_version }}/{{ ansible_distribution.lower() }}" diff --git a/roles/zabbix_proxy/defaults/main.yml b/roles/zabbix_proxy/defaults/main.yml index 55f2c446a..f827a3a55 100644 --- a/roles/zabbix_proxy/defaults/main.yml +++ b/roles/zabbix_proxy/defaults/main.yml @@ -40,6 +40,7 @@ zabbix_proxy_version_minor: "*" # Yum/APT Variables zabbix_repo_yum_schema: https zabbix_repo_yum_gpgcheck: 0 +zabbix_repo_deb_component: main zabbix_proxy_disable_repo: - epel zabbix_repo_yum: diff --git a/roles/zabbix_proxy/tasks/Debian.yml b/roles/zabbix_proxy/tasks/Debian.yml index a6d9df881..07a26e16f 100644 --- a/roles/zabbix_proxy/tasks/Debian.yml +++ b/roles/zabbix_proxy/tasks/Debian.yml @@ -7,6 +7,14 @@ tags: - always +- name: "Debian | Repo URL" + ansible.builtin.set_fact: + zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}{{ '-arm64' if ansible_machine == 'aarch64' else ''}}" + when: + - zabbix_repo_deb_url is undefined + tags: + - always + - name: "Debian | Set some facts for Zabbix" ansible.builtin.set_fact: datafiles_path: /usr/share/doc/zabbix-sql-scripts/{{ zabbix_proxy_db_long }} @@ -56,13 +64,20 @@ - install - name: "Debian | Installing repository {{ ansible_distribution }}" - ansible.builtin.apt_repository: - repo: "{{ item }} [signed-by={{ zabbix_gpg_key }}] http://repo.zabbix.com/zabbix/{{ zabbix_proxy_version }}/{{ ansible_distribution.lower() }}/ {{ ansible_distribution_release }} main" - state: present + ansible.builtin.copy: + dest: /etc/apt/sources.list.d/zabbix.sources + owner: root + group: root + mode: 0644 + content: | + Types: deb deb-src + Enabled: yes + URIs: {{ zabbix_repo_deb_url }} + Suites: {{ ansible_distribution_release }} + Components: {{ zabbix_repo_deb_component }} + Architectures: {{ 'amd64' if ansible_machine != 'aarch64' else 'arm64'}} + Signed-By: {{ zabbix_gpg_key }} become: true - with_items: - - deb-src - - deb tags: - install @@ -96,7 +111,7 @@ ansible.builtin.apt: pkg: "zabbix-proxy-{{ zabbix_proxy_database }}" update_cache: true - cache_valid_time: 3600 + cache_valid_time: 0 force: true state: "{{ zabbix_proxy_package_state }}" default_release: "{{ ansible_distribution_release }}" diff --git a/roles/zabbix_proxy/vars/Debian.yml b/roles/zabbix_proxy/vars/Debian.yml index a081d027b..449f928b2 100644 --- a/roles/zabbix_proxy/vars/Debian.yml +++ b/roles/zabbix_proxy/vars/Debian.yml @@ -52,3 +52,4 @@ mysql_plugin: debian_keyring_path: /etc/apt/keyrings/ zabbix_gpg_key: "{{ debian_keyring_path }}/zabbix-official-repo.asc" +_zabbix_repo_deb_url: "http://repo.zabbix.com/zabbix/{{ zabbix_proxy_version }}/{{ ansible_distribution.lower() }}" diff --git a/roles/zabbix_server/defaults/main.yml b/roles/zabbix_server/defaults/main.yml index f4cd45973..ff334474b 100644 --- a/roles/zabbix_server/defaults/main.yml +++ b/roles/zabbix_server/defaults/main.yml @@ -39,6 +39,7 @@ zabbix_server_version_minor: "*" zabbix_server_package_state: present zabbix_repo_yum_gpgcheck: 0 zabbix_repo_yum_schema: https +zabbix_repo_deb_component: main zabbix_server_disable_repo: - epel zabbix_repo_yum: diff --git a/roles/zabbix_server/tasks/Debian.yml b/roles/zabbix_server/tasks/Debian.yml index cb56f4b05..f268ef0e4 100644 --- a/roles/zabbix_server/tasks/Debian.yml +++ b/roles/zabbix_server/tasks/Debian.yml @@ -2,28 +2,16 @@ - name: "Debian | Set some variables" ansible.builtin.set_fact: zabbix_short_version: "{{ zabbix_server_version | regex_replace('\\.', '') }}" - zabbix_server_apt_repository: - - "http://repo.zabbix.com/zabbix/{{ zabbix_server_version }}/{{ ansible_distribution.lower() }}/" - - "{{ ansible_distribution_release }}" - - "main" zabbix_underscore_version: "{{ zabbix_server_version | regex_replace('\\.', '_') }}" zabbix_python_prefix: "python{% if ansible_python_version is version('3', '>=') %}3{% endif %}" - when: - - ansible_machine != "aarch64" tags: - always -- name: "Debian | Set some variables" +- name: "Debian | Repo URL" ansible.builtin.set_fact: - zabbix_short_version: "{{ zabbix_server_version | regex_replace('\\.', '') }}" - zabbix_server_apt_repository: - - "http://repo.zabbix.com/zabbix/{{ zabbix_server_version }}/{{ ansible_distribution.lower() }}-arm64/" - - "{{ ansible_distribution_release }}" - - "main" - zabbix_underscore_version: "{{ zabbix_server_version | regex_replace('\\.', '_') }}" - zabbix_python_prefix: "python{% if ansible_python_version is version('3', '>=') %}3{% endif %}" + zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}{{ '-arm64' if ansible_machine == 'aarch64' else ''}}" when: - - ansible_machine == "aarch64" + - zabbix_repo_deb_url is undefined tags: - always @@ -75,13 +63,20 @@ - install - name: "Debian | Installing repository {{ ansible_distribution }}" - ansible.builtin.apt_repository: - repo: "{{ item }} [signed-by={{ zabbix_gpg_key }}] {{ zabbix_server_apt_repository | join(' ') }}" - state: present + ansible.builtin.copy: + dest: /etc/apt/sources.list.d/zabbix.sources + owner: root + group: root + mode: 0644 + content: | + Types: deb deb-src + Enabled: yes + URIs: {{ zabbix_repo_deb_url }} + Suites: {{ ansible_distribution_release }} + Components: {{ zabbix_repo_deb_component }} + Architectures: {{ 'amd64' if ansible_machine != 'aarch64' else 'arm64'}} + Signed-By: {{ zabbix_gpg_key }} become: true - with_items: - - deb-src - - deb tags: - install diff --git a/roles/zabbix_server/vars/Debian.yml b/roles/zabbix_server/vars/Debian.yml index c863c1ebe..4c74370cb 100644 --- a/roles/zabbix_server/vars/Debian.yml +++ b/roles/zabbix_server/vars/Debian.yml @@ -30,3 +30,4 @@ zabbix_valid_server_versions: debian_keyring_path: /etc/apt/keyrings/ zabbix_gpg_key: "{{ debian_keyring_path }}/zabbix-official-repo.asc" +_zabbix_repo_deb_url: "http://repo.zabbix.com/zabbix/{{ zabbix_server_version }}/{{ ansible_distribution.lower() }}" diff --git a/roles/zabbix_web/defaults/main.yml b/roles/zabbix_web/defaults/main.yml index c7822b363..df0e286a4 100644 --- a/roles/zabbix_web/defaults/main.yml +++ b/roles/zabbix_web/defaults/main.yml @@ -52,6 +52,7 @@ zabbix_web_apt_priority: zabbix_web_version_minor: "*" zabbix_repo_yum_gpgcheck: 0 zabbix_repo_yum_schema: https +zabbix_repo_deb_component: main zabbix_web_disable_repo: - epel zabbix_repo_yum: diff --git a/roles/zabbix_web/tasks/Debian.yml b/roles/zabbix_web/tasks/Debian.yml index 00f5341f4..c9648d9f0 100644 --- a/roles/zabbix_web/tasks/Debian.yml +++ b/roles/zabbix_web/tasks/Debian.yml @@ -8,28 +8,16 @@ - name: "Debian | Set some variables" ansible.builtin.set_fact: zabbix_short_version: "{{ zabbix_web_version | regex_replace('\\.', '') }}" - zabbix_web_apt_repository: - - "http://repo.zabbix.com/zabbix/{{ zabbix_web_version }}/{{ ansible_distribution.lower() }}/" - - "{{ ansible_distribution_release }}" - - "main" zabbix_underscore_version: "{{ zabbix_web_version | regex_replace('\\.', '_') }}" zabbix_python_prefix: "python{% if ansible_python_version is version('3', '>=') %}3{% endif %}" - when: - - ansible_machine != "aarch64" tags: - always -- name: "Debian | Set some variables" +- name: "Debian | Repo URL" ansible.builtin.set_fact: - zabbix_short_version: "{{ zabbix_web_version | regex_replace('\\.', '') }}" - zabbix_web_apt_repository: - - "http://repo.zabbix.com/zabbix/{{ zabbix_web_version }}/{{ ansible_distribution.lower() }}-arm64/" - - "{{ ansible_distribution_release }}" - - "main" - zabbix_underscore_version: "{{ zabbix_web_version | regex_replace('\\.', '_') }}" - zabbix_python_prefix: "python{% if ansible_python_version is version('3', '>=') %}3{% endif %}" + zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}{{ '-arm64' if ansible_machine == 'aarch64' else ''}}" when: - - ansible_machine == "aarch64" + - zabbix_repo_deb_url is undefined tags: - always @@ -91,13 +79,20 @@ - install - name: "Debian | Installing repository {{ ansible_distribution }}" - ansible.builtin.apt_repository: - repo: "{{ item }} [signed-by={{ zabbix_gpg_key }}] {{ zabbix_web_apt_repository | join(' ') }}" - state: present + ansible.builtin.copy: + dest: /etc/apt/sources.list.d/zabbix.sources + owner: root + group: root + mode: 0644 + content: | + Types: deb deb-src + Enabled: yes + URIs: {{ zabbix_repo_deb_url }} + Suites: {{ ansible_distribution_release }} + Components: {{ zabbix_repo_deb_component }} + Architectures: {{ 'amd64' if ansible_machine != 'aarch64' else 'arm64'}} + Signed-By: {{ zabbix_gpg_key }} become: true - with_items: - - deb-src - - deb tags: - install diff --git a/roles/zabbix_web/vars/Debian.yml b/roles/zabbix_web/vars/Debian.yml index f23c56fde..0eaaee8b8 100644 --- a/roles/zabbix_web/vars/Debian.yml +++ b/roles/zabbix_web/vars/Debian.yml @@ -48,3 +48,4 @@ zabbix_valid_web_versions: debian_keyring_path: /etc/apt/keyrings/ zabbix_gpg_key: "{{ debian_keyring_path }}/zabbix-official-repo.asc" +_zabbix_repo_deb_url: "http://repo.zabbix.com/zabbix/{{ zabbix_web_version }}/{{ ansible_distribution.lower() }}"