Skip to content

Commit

Permalink
Add raspberry pi support
Browse files Browse the repository at this point in the history
  • Loading branch information
miettal authored Dec 27, 2023
1 parent da6d712 commit c92ad07
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 10 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/raspberrypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- zabbix-{agent, javagateway, proxy, server, web} - support raspberry pi without repository url specification
21 changes: 20 additions & 1 deletion roles/zabbix_agent/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,28 @@
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 | 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 }}{{ '-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:
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_agent/vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
21 changes: 20 additions & 1 deletion roles/zabbix_javagateway/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,28 @@
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 | 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 }}{{ '-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:
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_javagateway/vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
21 changes: 20 additions & 1 deletion roles/zabbix_proxy/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,28 @@
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 | 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 }}{{ '-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:
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_proxy/vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
21 changes: 20 additions & 1 deletion roles/zabbix_server/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,28 @@
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 | 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 }}{{ '-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:
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_server/vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
21 changes: 20 additions & 1 deletion roles/zabbix_web/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,28 @@
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
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 }}{{ '-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:
Expand Down
2 changes: 1 addition & 1 deletion roles/zabbix_web/vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

0 comments on commit c92ad07

Please sign in to comment.