Skip to content

Commit 52784c1

Browse files
committed
Add Debian 12 OS support
add OS to metadata, skip acceptance on version 5.0
1 parent db01009 commit 52784c1

11 files changed

+25
-5
lines changed

metadata.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@
131131
{
132132
"operatingsystem": "Debian",
133133
"operatingsystemrelease": [
134-
"11"
134+
"11",
135+
"12"
135136
]
136137
},
137138
{

spec/acceptance/agent_spec.rb

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
require 'spec_helper_acceptance'
44

55
supported_versions.each do |version|
6+
# < 6.0 agent packages are not available for Debian 12
7+
next if version < '6.0' && default[:platform] =~ %r{debian-12}
8+
69
describe "zabbix::agent class with zabbix_version #{version}" do
710
it 'works idempotently with no errors' do
811
pp = <<-EOS

spec/acceptance/server_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class { 'zabbix::database': }
4545
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
4646
# <6.0 server packages are not available for ubuntu 22.04
4747
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
48+
# < 6.0 server packages are not available for Debian 12
49+
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian-12}
4850

4951
context "deploys a zabbix #{zabbix_version} server" do
5052
# Using puppet_apply as a helper

spec/acceptance/zabbix_application_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
1212
# <6.0 server packages are not available for ubuntu 22.04
1313
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
14+
# < 6.0 server packages are not available for Debian 12
15+
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian-12}
1416

1517
template = case zabbix_version
1618
when '5.0'

spec/acceptance/zabbix_host_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
1313
# <6.0 server packages are not available for ubuntu 22.04
1414
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
15+
# < 6.0 server packages are not available for Debian 12
16+
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian-12}
1517

1618
context "create zabbix_host resources with zabbix version #{zabbix_version}" do
1719
# This will deploy a running Zabbix setup (server, web, db) which we can

spec/acceptance/zabbix_hostgroup_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
1212
# <6.0 server packages are not available for ubuntu 22.04
1313
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
14+
# < 6.0 server packages are not available for Debian 12
15+
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian-12}
1416

1517
context "create zabbix_hostgroup resources with zabbix version #{zabbix_version}" do
1618
# This will deploy a running Zabbix setup (server, web, db) which we can

spec/acceptance/zabbix_proxy_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
1313
# <6.0 server packages are not available for ubuntu 22.04
1414
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
15+
# < 6.0 server packages are not available for Debian 12
16+
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian-12}
1517

1618
context "create zabbix_proxy resources with zabbix version #{zabbix_version}" do
1719
# This will deploy a running Zabbix setup (server, web, db) which we can

spec/acceptance/zabbix_template_host_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
1414
# <6.0 server packages are not available for ubuntu 22.04
1515
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
16+
# < 6.0 server packages are not available for Debian 12
17+
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian-12}
1618

1719
context "create zabbix_template_host resources with zabbix version #{zabbix_version}" do
1820
template = case zabbix_version

spec/acceptance/zabbix_template_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
next if zabbix_version < '6.0' && default[:platform] == 'el-9-x86_64'
1212
# <6.0 server packages are not available for ubuntu 22.04
1313
next if zabbix_version < '6.0' && default[:platform] =~ %r{ubuntu-22}
14+
# < 6.0 server packages are not available for Debian 12
15+
next if zabbix_version < '6.0' && default[:platform] =~ %r{debian-12}
1416

1517
context "create zabbix_template resources with zabbix version #{zabbix_version}" do
1618
# This will deploy a running Zabbix setup (server, web, db) which we can

spec/setup_acceptance_node.pp

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
'Debian': {
33
# On Debian it seems that make is searching for mkdir in /usr/bin/ but mkdir
44
# does not exist. Symlink it from /bin/mkdir to make it work.
5-
file { '/usr/bin/mkdir':
6-
ensure => link,
7-
target => '/bin/mkdir',
5+
if $facts['os']['release']['major'] < '12' {
6+
file { '/usr/bin/mkdir':
7+
ensure => link,
8+
target => '/bin/mkdir',
9+
}
810
}
911
}
1012
'Ubuntu': {

spec/spec_helper_methods.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def baseline_os_hash
99
},
1010
{
1111
'operatingsystem' => 'Debian',
12-
'operatingsystemrelease' => %w[11]
12+
'operatingsystemrelease' => %w[11 12]
1313
},
1414
{
1515
'operatingsystem' => 'Ubuntu',

0 commit comments

Comments
 (0)