Skip to content

Commit

Permalink
Add support for Ubuntu 24.04 Noble Numbat (all roles) (#1221)
Browse files Browse the repository at this point in the history
  • Loading branch information
sblaisot authored May 18, 2024
1 parent ef06198 commit ea1edfb
Show file tree
Hide file tree
Showing 29 changed files with 162 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
container:
- rockylinux9
- rockylinux8
- ubuntu2404
- ubuntu2204
- ubuntu2004
- ubuntu1804
Expand All @@ -40,6 +41,8 @@ jobs:
exclude:
- container: debian12
version: v62
- container: ubuntu2404
version: v62

steps:
- name: Check out code
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/javagateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- rockylinux9
- rockylinux8
- centos7
- ubuntu2404
- ubuntu2204
- ubuntu2004
- ubuntu1804
Expand All @@ -40,6 +41,8 @@ jobs:
exclude:
- container: debian12
version: v62
- container: ubuntu2404
version: v62
collection_role:
- zabbix_javagateway
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- rockylinux9
- rockylinux8
- centos7
- ubuntu2404
- ubuntu2204
- ubuntu2004
- ubuntu1804
Expand All @@ -46,6 +47,8 @@ jobs:
exclude:
- container: debian12
version: v62
- container: ubuntu2404
version: v62
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
container:
- rockylinux9
- rockylinux8
- ubuntu2404
- ubuntu2204
- ubuntu2004
- ubuntu1804
Expand All @@ -42,6 +43,8 @@ jobs:
version: v62
- container: debian10
version: v62
- container: ubuntu2404
version: v62
- container: ubuntu1804
version: v62
- container: ubuntu1804
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
container:
- rockylinux9
- rockylinux8
- ubuntu2404
- ubuntu2204
- ubuntu2004
- ubuntu1804
Expand All @@ -45,6 +46,8 @@ jobs:
exclude:
- container: debian10
version: v62
- container: ubuntu2404
version: v62
- container: ubuntu1804
version: v62
- container: debian10
Expand Down
2 changes: 2 additions & 0 deletions changelogs/fragments/1221-add_support_for_ubuntu_24.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- all roles - Added support for Ubuntu 24.04 (Noble Numbat)
3 changes: 2 additions & 1 deletion docs/ZABBIX_AGENT_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ 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 |
| Ubuntu 18.04 bionic | V | V | V |
Expand All @@ -119,7 +120,7 @@ The following is an overview of all available configuration default for this rol
* `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`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key` (or `https://repo.zabbix.com/zabbix-official-repo-apr2024.gpg` for Ubuntu 24.04 repo).
* `zabbix_repo_deb_include_deb_src`: True, if deb-src should be included in the zabbix.sources entry. Default `true`.

### SElinux
Expand Down
3 changes: 2 additions & 1 deletion docs/ZABBIX_JAVAGATEWAY_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ 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 |
| Ubuntu 18.04 bionic | V | V | V |
Expand All @@ -64,7 +65,7 @@ The `zabbix_javagateway_version` is optional. The latest available major.minor v
* `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`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key` (or `https://repo.zabbix.com/zabbix-official-repo-apr2024.gpg` for Ubuntu 24.04 repo).
* `zabbix_repo_deb_include_deb_src`: True, if deb-src should be included in the zabbix.sources entry. Default `true`.

### Java Gatewaty
Expand Down
3 changes: 2 additions & 1 deletion docs/ZABBIX_PROXY_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ 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 |
| Ubuntu 18.04 bionic | V | V | V |
Expand Down Expand Up @@ -135,7 +136,7 @@ The following is an overview of all available configuration default for this rol
* `*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`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key` (or `https://repo.zabbix.com/zabbix-official-repo-apr2024.gpg` for Ubuntu 24.04 repo).
* `zabbix_repo_deb_include_deb_src`: True, if deb-src should be included in the zabbix.sources entry. Default `true`.

### SElinux
Expand Down
3 changes: 2 additions & 1 deletion docs/ZABBIX_SERVER_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ 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 |
| Ubuntu 24.04 noble | V | | V |
| Ubuntu 22.04 jammy | V | V | V |
| Ubuntu 20.04 focal | V | V | V |
| Ubuntu 18.04 bionic | | | V |
Expand Down Expand Up @@ -111,7 +112,7 @@ The following is an overview of all available configuration default for this rol
* `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`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key` (or `https://repo.zabbix.com/zabbix-official-repo-apr2024.gpg` for Ubuntu 24.04 repo).
* `zabbix_repo_deb_include_deb_src`: True, if deb-src should be included in the zabbix.sources entry. Default `true`.

### SElinux
Expand Down
3 changes: 2 additions & 1 deletion docs/ZABBIX_WEB_ROLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ 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 |
| Ubuntu 24.04 noble | V | | V |
| Ubuntu 22.04 jammy | V | V | V |
| Ubuntu 20.04 focal | V | V | V |
| Ubuntu 18.04 bionic | | | V |
Expand Down Expand Up @@ -97,7 +98,7 @@ The following is an overview of all available configuration defaults for this ro
* `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_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key`.
* `zabbix_repo_deb_gpg_key_url`: The URL to download the Zabbix GPG key from. Default `http://repo.zabbix.com/zabbix-official-repo.key` (or `https://repo.zabbix.com/zabbix-official-repo-apr2024.gpg` for Ubuntu 24.04 repo).
* `zabbix_repo_deb_include_deb_src`: True, if deb-src should be included in the zabbix.sources entry. Default `true`.

### Zabbix Web specific
Expand Down
4 changes: 2 additions & 2 deletions molecule/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Install CI dependencies for the Zabbix Roles
ansible==7.0.0
#ansible==8.0.0 # commented out to avoid installing collections in site-packages/ansible_collections
ansible-compat==3.0.0
ansible-core==2.14.2
ansible-core==2.15.11
docker==6.1.3
molecule<5
molecule-docker @ git+https://github.com/ansible-community/molecule-docker@main
Expand Down
11 changes: 9 additions & 2 deletions molecule/zabbix_web/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
when: ansible_version.full is version("2.14", "<")

- name: "Apt update"
ansible.builtin.shell: "apt-get update && echo exit 0 > /usr/sbin/policy-rc.d"
ansible.builtin.shell: "apt-get update"
args:
warn: "{{ produce_warn | default(omit) }}"
register: installation_dependencies
Expand Down Expand Up @@ -162,7 +162,14 @@
- ansible_distribution_major_version >= '22'
- ansible_os_family == "Debian"

- name: Set PHP packages (Ubuntu 2204)
- name: Set PHP Version (Ubuntu 2404)
ansible.builtin.set_fact:
__php_default_version_debian: "8.3"
when:
- ansible_distribution_major_version >= '24'
- ansible_os_family == "Debian"

- name: Set PHP packages (Ubuntu 2204 & 2404)
ansible.builtin.set_fact:
__php_packages:
- php{{ __php_default_version_debian }}-common
Expand Down
1 change: 0 additions & 1 deletion roles/zabbix_agent/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ zabbix_agent_tlspskidentity_file: "/etc/zabbix/tls_psk_auto.identity"
# Selinux related vars
selinux_allow_zabbix_run_sudo: false

zabbix_repo_deb_gpg_key_url: http://repo.zabbix.com/zabbix-official-repo.key
zabbix_repo_deb_include_deb_src: true

zabbix_agent_install_agent_only: false
Expand Down
6 changes: 3 additions & 3 deletions roles/zabbix_agent/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
- name: "Debian | Download gpg key"
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 }}"
url: "{{ zabbix_repo_deb_gpg_key_url | default(_zabbix_repo_default_deb_gpg_key_url_by_distrib[ansible_distribution_major_version]) }}"
dest: "{{ zabbix_gpg_key | default(_zabbix_gpg_key_default_by_distrib[ansible_distribution_major_version]) }}"
mode: "0644"
force: true
environment:
Expand All @@ -64,7 +64,7 @@
Suites: {{ ansible_distribution_release }}
Components: {{ zabbix_repo_deb_component }}
Architectures: {{ 'amd64' if ansible_machine != 'aarch64' else 'arm64'}}
Signed-By: {{ zabbix_gpg_key }}
Signed-By: {{ zabbix_gpg_key | default(_zabbix_gpg_key_default_by_distrib[ansible_distribution_major_version]) }}
become: true
tags:
- install
Expand Down
23 changes: 22 additions & 1 deletion roles/zabbix_agent/vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ zabbix_valid_agent_versions:
- 6.2
- 6.0
# Ubuntu
"24":
- 6.4
- 6.0

"22":
- 6.4
- 6.2
Expand All @@ -41,4 +45,21 @@ zabbix_valid_agent_versions:
- 6.0

debian_keyring_path: /etc/apt/keyrings/
zabbix_gpg_key: "{{ debian_keyring_path }}zabbix-repo.asc"
_zabbix_gpg_key_default_by_distrib:
"12": "{{ debian_keyring_path }}zabbix-repo.asc"
"11": "{{ debian_keyring_path }}zabbix-repo.asc"
"10": "{{ debian_keyring_path }}zabbix-repo.asc"
"9": "{{ debian_keyring_path }}zabbix-repo.asc"
"24": "{{ debian_keyring_path }}zabbix-repo.gpg"
"22": "{{ debian_keyring_path }}zabbix-repo.asc"
"20": "{{ debian_keyring_path }}zabbix-repo.asc"
"18": "{{ debian_keyring_path }}zabbix-repo.asc"
_zabbix_repo_default_deb_gpg_key_url_by_distrib:
"12": https://repo.zabbix.com/zabbix-official-repo.key
"11": https://repo.zabbix.com/zabbix-official-repo.key
"10": https://repo.zabbix.com/zabbix-official-repo.key
"9": https://repo.zabbix.com/zabbix-official-repo.key
"24": https://repo.zabbix.com/zabbix-official-repo-apr2024.gpg
"22": https://repo.zabbix.com/zabbix-official-repo.key
"20": https://repo.zabbix.com/zabbix-official-repo.key
"18": https://repo.zabbix.com/zabbix-official-repo.key
1 change: 0 additions & 1 deletion roles/zabbix_javagateway/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@ zabbix_javagateway_listenip: 0.0.0.0
zabbix_javagateway_listenport: 10052
zabbix_javagateway_startpollers: 5

zabbix_repo_deb_gpg_key_url: http://repo.zabbix.com/zabbix-official-repo.key
zabbix_repo_deb_include_deb_src: true
11 changes: 8 additions & 3 deletions roles/zabbix_javagateway/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
- name: "Debian | Download gpg key"
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 }}"
url: "{{ zabbix_repo_deb_gpg_key_url | default(_zabbix_repo_default_deb_gpg_key_url_by_distrib[ansible_distribution_major_version]) }}"
dest: "{{ zabbix_gpg_key | default(_zabbix_gpg_key_default_by_distrib[ansible_distribution_major_version]) }}"
mode: "0644"
force: true
environment:
Expand All @@ -45,11 +45,16 @@
Suites: {{ ansible_distribution_release }}
Components: {{ zabbix_repo_deb_component }}
Architectures: {{ 'amd64' if ansible_machine != 'aarch64' else 'arm64'}}
Signed-By: {{ zabbix_gpg_key }}
Signed-By: {{ zabbix_gpg_key | default(_zabbix_gpg_key_default_by_distrib[ansible_distribution_major_version]) }}
register: zabbix_repo
become: true
tags:
- install

- name: "Debian | Update apt cache if repo was added"
ansible.builtin.apt: update_cache=yes
when: zabbix_repo is changed

- name: "Debian | Installing zabbix-java-gateway"
ansible.builtin.apt:
pkg: zabbix-java-gateway
Expand Down
20 changes: 19 additions & 1 deletion roles/zabbix_javagateway/vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ zabbix_valid_javagateway_versions:
- 6.2
- 6.0
# Ubuntu
"24":
- 6.4
- 6.0
"22":
- 6.4
- 6.2
Expand All @@ -26,4 +29,19 @@ zabbix_valid_javagateway_versions:
- 6.0

debian_keyring_path: /etc/apt/keyrings/
zabbix_gpg_key: "{{ debian_keyring_path }}zabbix-repo.asc"
_zabbix_gpg_key_default_by_distrib:
"12": "{{ debian_keyring_path }}zabbix-repo.asc"
"11": "{{ debian_keyring_path }}zabbix-repo.asc"
"10": "{{ debian_keyring_path }}zabbix-repo.asc"
"24": "{{ debian_keyring_path }}zabbix-repo.gpg"
"22": "{{ debian_keyring_path }}zabbix-repo.asc"
"20": "{{ debian_keyring_path }}zabbix-repo.asc"
"18": "{{ debian_keyring_path }}zabbix-repo.asc"
_zabbix_repo_default_deb_gpg_key_url_by_distrib:
"12": https://repo.zabbix.com/zabbix-official-repo.key
"11": https://repo.zabbix.com/zabbix-official-repo.key
"10": https://repo.zabbix.com/zabbix-official-repo.key
"24": https://repo.zabbix.com/zabbix-official-repo-apr2024.gpg
"22": https://repo.zabbix.com/zabbix-official-repo.key
"20": https://repo.zabbix.com/zabbix-official-repo.key
"18": https://repo.zabbix.com/zabbix-official-repo.key
1 change: 0 additions & 1 deletion roles/zabbix_proxy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ zabbix_repo_yum:
state: present
zabbix_proxy_apt_priority:
zabbix_proxy_package_state: present
zabbix_repo_deb_gpg_key_url: http://repo.zabbix.com/zabbix-official-repo.key
zabbix_repo_deb_include_deb_src: true

# Proxy Configuration Variables (Only ones with role provided defaults)
Expand Down
6 changes: 3 additions & 3 deletions roles/zabbix_proxy/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
- name: "Debian | Download gpg key"
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 }}"
url: "{{ zabbix_repo_deb_gpg_key_url | default(_zabbix_repo_default_deb_gpg_key_url_by_distrib[ansible_distribution_major_version]) }}"
dest: "{{ zabbix_gpg_key | default(_zabbix_gpg_key_default_by_distrib[ansible_distribution_major_version]) }}"
mode: "0644"
force: true
environment:
Expand All @@ -72,7 +72,7 @@
Suites: {{ ansible_distribution_release }}
Components: {{ zabbix_repo_deb_component }}
Architectures: {{ 'amd64' if ansible_machine != 'aarch64' else 'arm64'}}
Signed-By: {{ zabbix_gpg_key }}
Signed-By: {{ zabbix_gpg_key | default(_zabbix_gpg_key_default_by_distrib[ansible_distribution_major_version]) }}
become: true
tags:
- install
Expand Down
Loading

0 comments on commit ea1edfb

Please sign in to comment.