From 190d2a8e22b90856cb26110b76b4d2634173bfc9 Mon Sep 17 00:00:00 2001 From: Hiromasa Ihara Date: Thu, 7 Dec 2023 00:40:58 +0900 Subject: [PATCH 1/5] feat: add raspberry pi spport --- roles/zabbix_agent/tasks/Debian.yml | 2 +- roles/zabbix_agent/vars/Debian.yml | 2 +- roles/zabbix_javagateway/tasks/Debian.yml | 2 +- roles/zabbix_javagateway/vars/Debian.yml | 2 +- roles/zabbix_proxy/tasks/Debian.yml | 2 +- roles/zabbix_proxy/vars/Debian.yml | 2 +- roles/zabbix_server/tasks/Debian.yml | 2 +- roles/zabbix_server/vars/Debian.yml | 2 +- roles/zabbix_web/tasks/Debian.yml | 2 +- roles/zabbix_web/vars/Debian.yml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/zabbix_agent/tasks/Debian.yml b/roles/zabbix_agent/tasks/Debian.yml index 35391a56b..c3abe499d 100644 --- a/roles/zabbix_agent/tasks/Debian.yml +++ b/roles/zabbix_agent/tasks/Debian.yml @@ -10,7 +10,7 @@ - name: "Debian | Repo URL" ansible.builtin.set_fact: - zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}{{ '-arm64' if ansible_machine == 'aarch64' else ''}}" + zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" when: - zabbix_repo_deb_url is undefined tags: diff --git a/roles/zabbix_agent/vars/Debian.yml b/roles/zabbix_agent/vars/Debian.yml index 88e566fb4..4a65dfbeb 100644 --- a/roles/zabbix_agent/vars/Debian.yml +++ b/roles/zabbix_agent/vars/Debian.yml @@ -45,4 +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() }}" +_zabbix_repo_deb_url: "http://repo.zabbix.com/zabbix/{{ zabbix_agent_version }}" diff --git a/roles/zabbix_javagateway/tasks/Debian.yml b/roles/zabbix_javagateway/tasks/Debian.yml index e60dee8fa..c0e0ffb06 100644 --- a/roles/zabbix_javagateway/tasks/Debian.yml +++ b/roles/zabbix_javagateway/tasks/Debian.yml @@ -7,7 +7,7 @@ - name: "Debian | Repo URL" ansible.builtin.set_fact: - zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}{{ '-arm64' if ansible_machine == 'aarch64' else ''}}" + zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" when: - zabbix_repo_deb_url is undefined tags: diff --git a/roles/zabbix_javagateway/vars/Debian.yml b/roles/zabbix_javagateway/vars/Debian.yml index 544e33094..2253f5b7b 100644 --- a/roles/zabbix_javagateway/vars/Debian.yml +++ b/roles/zabbix_javagateway/vars/Debian.yml @@ -27,4 +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() }}" +_zabbix_repo_deb_url: "http://repo.zabbix.com/zabbix/{{ zabbix_javagateway_version }}" diff --git a/roles/zabbix_proxy/tasks/Debian.yml b/roles/zabbix_proxy/tasks/Debian.yml index 07a26e16f..69a5a50c2 100644 --- a/roles/zabbix_proxy/tasks/Debian.yml +++ b/roles/zabbix_proxy/tasks/Debian.yml @@ -9,7 +9,7 @@ - name: "Debian | Repo URL" ansible.builtin.set_fact: - zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}{{ '-arm64' if ansible_machine == 'aarch64' else ''}}" + zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" when: - zabbix_repo_deb_url is undefined tags: diff --git a/roles/zabbix_proxy/vars/Debian.yml b/roles/zabbix_proxy/vars/Debian.yml index 182b1109a..cd9527eb2 100644 --- a/roles/zabbix_proxy/vars/Debian.yml +++ b/roles/zabbix_proxy/vars/Debian.yml @@ -52,6 +52,6 @@ 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() }}" +_zabbix_repo_deb_url: "http://repo.zabbix.com/zabbix/{{ zabbix_proxy_version }}" _zabbix_proxy_fping6location: /usr/bin/fping6 _zabbix_proxy_fpinglocation: /usr/bin/fping diff --git a/roles/zabbix_server/tasks/Debian.yml b/roles/zabbix_server/tasks/Debian.yml index 6f8f0f404..360e000fc 100644 --- a/roles/zabbix_server/tasks/Debian.yml +++ b/roles/zabbix_server/tasks/Debian.yml @@ -9,7 +9,7 @@ - name: "Debian | Repo URL" ansible.builtin.set_fact: - zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}{{ '-arm64' if ansible_machine == 'aarch64' else ''}}" + zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" when: - zabbix_repo_deb_url is undefined tags: diff --git a/roles/zabbix_server/vars/Debian.yml b/roles/zabbix_server/vars/Debian.yml index 2b566e8a1..4074869e6 100644 --- a/roles/zabbix_server/vars/Debian.yml +++ b/roles/zabbix_server/vars/Debian.yml @@ -30,6 +30,6 @@ 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() }}" +_zabbix_repo_deb_url: "http://repo.zabbix.com/zabbix/{{ zabbix_server_version }}" _zabbix_server_fping6location: /usr/bin/fping6 _zabbix_server_fpinglocation: /usr/bin/fping diff --git a/roles/zabbix_web/tasks/Debian.yml b/roles/zabbix_web/tasks/Debian.yml index 3274839b1..3a39e4972 100644 --- a/roles/zabbix_web/tasks/Debian.yml +++ b/roles/zabbix_web/tasks/Debian.yml @@ -15,7 +15,7 @@ - name: "Debian | Repo URL" ansible.builtin.set_fact: - zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}{{ '-arm64' if ansible_machine == 'aarch64' else ''}}" + zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" when: - zabbix_repo_deb_url is undefined tags: diff --git a/roles/zabbix_web/vars/Debian.yml b/roles/zabbix_web/vars/Debian.yml index 0eaaee8b8..7b60c70bd 100644 --- a/roles/zabbix_web/vars/Debian.yml +++ b/roles/zabbix_web/vars/Debian.yml @@ -48,4 +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() }}" +_zabbix_repo_deb_url: "http://repo.zabbix.com/zabbix/{{ zabbix_web_version }}" From a0946320050ed35c122d4253cdea6e61b1cecaf5 Mon Sep 17 00:00:00 2001 From: Hiromasa Ihara Date: Fri, 8 Dec 2023 17:42:39 +0900 Subject: [PATCH 2/5] fix: add lsb installation --- roles/zabbix_agent/tasks/Debian.yml | 14 ++++++++++++++ roles/zabbix_javagateway/tasks/Debian.yml | 14 ++++++++++++++ roles/zabbix_proxy/tasks/Debian.yml | 14 ++++++++++++++ roles/zabbix_server/tasks/Debian.yml | 14 ++++++++++++++ roles/zabbix_web/tasks/Debian.yml | 14 ++++++++++++++ 5 files changed, 70 insertions(+) diff --git a/roles/zabbix_agent/tasks/Debian.yml b/roles/zabbix_agent/tasks/Debian.yml index c3abe499d..9956b8b6b 100644 --- a/roles/zabbix_agent/tasks/Debian.yml +++ b/roles/zabbix_agent/tasks/Debian.yml @@ -8,6 +8,20 @@ tags: - always +- name: "Debian | Installing lsb-release" + ansible.builtin.apt: + pkg: lsb-release + update_cache: true + cache_valid_time: 3600 + force: true + state: present + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + become: true + tags: + - install + - name: "Debian | Repo URL" ansible.builtin.set_fact: zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" diff --git a/roles/zabbix_javagateway/tasks/Debian.yml b/roles/zabbix_javagateway/tasks/Debian.yml index c0e0ffb06..6e6242a4c 100644 --- a/roles/zabbix_javagateway/tasks/Debian.yml +++ b/roles/zabbix_javagateway/tasks/Debian.yml @@ -5,6 +5,20 @@ tags: - always +- name: "Debian | Installing lsb-release" + ansible.builtin.apt: + pkg: lsb-release + update_cache: true + cache_valid_time: 3600 + force: true + state: present + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + become: true + tags: + - install + - name: "Debian | Repo URL" ansible.builtin.set_fact: zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" diff --git a/roles/zabbix_proxy/tasks/Debian.yml b/roles/zabbix_proxy/tasks/Debian.yml index 69a5a50c2..822159e83 100644 --- a/roles/zabbix_proxy/tasks/Debian.yml +++ b/roles/zabbix_proxy/tasks/Debian.yml @@ -7,6 +7,20 @@ tags: - always +- name: "Debian | Installing lsb-release" + ansible.builtin.apt: + pkg: lsb-release + update_cache: true + cache_valid_time: 3600 + force: true + state: present + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + become: true + tags: + - install + - name: "Debian | Repo URL" ansible.builtin.set_fact: zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" diff --git a/roles/zabbix_server/tasks/Debian.yml b/roles/zabbix_server/tasks/Debian.yml index 360e000fc..91a6a0f2e 100644 --- a/roles/zabbix_server/tasks/Debian.yml +++ b/roles/zabbix_server/tasks/Debian.yml @@ -7,6 +7,20 @@ tags: - always +- name: "Debian | Installing lsb-release" + ansible.builtin.apt: + pkg: lsb-release + update_cache: true + cache_valid_time: 3600 + force: true + state: present + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + become: true + tags: + - install + - name: "Debian | Repo URL" ansible.builtin.set_fact: zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" diff --git a/roles/zabbix_web/tasks/Debian.yml b/roles/zabbix_web/tasks/Debian.yml index 3a39e4972..a4d58d9f8 100644 --- a/roles/zabbix_web/tasks/Debian.yml +++ b/roles/zabbix_web/tasks/Debian.yml @@ -13,6 +13,20 @@ tags: - always +- name: "Debian | Installing lsb-release" + ansible.builtin.apt: + pkg: lsb-release + update_cache: true + cache_valid_time: 3600 + force: true + state: present + environment: + http_proxy: "{{ zabbix_http_proxy | default(None) | default(omit) }}" + https_proxy: "{{ zabbix_https_proxy | default(None) | default(omit) }}" + become: true + tags: + - install + - name: "Debian | Repo URL" ansible.builtin.set_fact: zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" From 05c3288e7055a4165e39bf31809da9d87fb4f340 Mon Sep 17 00:00:00 2001 From: Hiromasa Ihara Date: Fri, 8 Dec 2023 18:02:48 +0900 Subject: [PATCH 3/5] fix: add fragment --- changelogs/fragments/raspberrypi.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/raspberrypi.yml diff --git a/changelogs/fragments/raspberrypi.yml b/changelogs/fragments/raspberrypi.yml new file mode 100644 index 000000000..7b5fd8178 --- /dev/null +++ b/changelogs/fragments/raspberrypi.yml @@ -0,0 +1,2 @@ +bugfixes: + - zabbix-{agent, javagateway, proxy, server, web} - support raspberry pi without repository url specification From f478937b7388212ac5d94b401ff6f5eae919675a Mon Sep 17 00:00:00 2001 From: Hiromasa Ihara Date: Fri, 8 Dec 2023 23:56:32 +0900 Subject: [PATCH 4/5] fix: add ansible.builtin.setup to update ansible_lsb fact --- roles/zabbix_agent/tasks/Debian.yml | 5 +++++ roles/zabbix_javagateway/tasks/Debian.yml | 5 +++++ roles/zabbix_proxy/tasks/Debian.yml | 5 +++++ roles/zabbix_server/tasks/Debian.yml | 5 +++++ roles/zabbix_web/tasks/Debian.yml | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/roles/zabbix_agent/tasks/Debian.yml b/roles/zabbix_agent/tasks/Debian.yml index 9956b8b6b..6ded0ba03 100644 --- a/roles/zabbix_agent/tasks/Debian.yml +++ b/roles/zabbix_agent/tasks/Debian.yml @@ -22,6 +22,11 @@ tags: - install +- name: "Debian | Update ansible_lsb fact" + ansible.builtin.setup: + gather_subset: + - lsb + - name: "Debian | Repo URL" ansible.builtin.set_fact: zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" diff --git a/roles/zabbix_javagateway/tasks/Debian.yml b/roles/zabbix_javagateway/tasks/Debian.yml index 6e6242a4c..4c4cff06d 100644 --- a/roles/zabbix_javagateway/tasks/Debian.yml +++ b/roles/zabbix_javagateway/tasks/Debian.yml @@ -19,6 +19,11 @@ tags: - install +- name: "Debian | Update ansible_lsb fact" + ansible.builtin.setup: + gather_subset: + - lsb + - name: "Debian | Repo URL" ansible.builtin.set_fact: zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" diff --git a/roles/zabbix_proxy/tasks/Debian.yml b/roles/zabbix_proxy/tasks/Debian.yml index 822159e83..8e27e7d27 100644 --- a/roles/zabbix_proxy/tasks/Debian.yml +++ b/roles/zabbix_proxy/tasks/Debian.yml @@ -21,6 +21,11 @@ tags: - install +- name: "Debian | Update ansible_lsb fact" + ansible.builtin.setup: + gather_subset: + - lsb + - name: "Debian | Repo URL" ansible.builtin.set_fact: zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" diff --git a/roles/zabbix_server/tasks/Debian.yml b/roles/zabbix_server/tasks/Debian.yml index 91a6a0f2e..ccfe6f121 100644 --- a/roles/zabbix_server/tasks/Debian.yml +++ b/roles/zabbix_server/tasks/Debian.yml @@ -21,6 +21,11 @@ tags: - install +- name: "Debian | Update ansible_lsb fact" + ansible.builtin.setup: + gather_subset: + - lsb + - name: "Debian | Repo URL" ansible.builtin.set_fact: zabbix_repo_deb_url: "{{ _zabbix_repo_deb_url }}/{{ ansible_lsb.id.lower() }}{{ '-arm64' if ansible_machine == 'aarch64' and ansible_lsb.id == 'debian' else ''}}" diff --git a/roles/zabbix_web/tasks/Debian.yml b/roles/zabbix_web/tasks/Debian.yml index a4d58d9f8..ae1c7de26 100644 --- a/roles/zabbix_web/tasks/Debian.yml +++ b/roles/zabbix_web/tasks/Debian.yml @@ -13,6 +13,11 @@ tags: - always +- name: "Debian | Update ansible_lsb fact" + ansible.builtin.setup: + gather_subset: + - lsb + - name: "Debian | Installing lsb-release" ansible.builtin.apt: pkg: lsb-release From 4c9b53b602efd7d168c0cca8568b1c159f37a475 Mon Sep 17 00:00:00 2001 From: Hiromasa Ihara Date: Wed, 27 Dec 2023 11:14:12 +0900 Subject: [PATCH 5/5] kick ci