Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
require => [
Class['mysql::server'],
Mysql::Db[$database_name],
Mysql_user["${database_user}@${zabbix_web}"]
Mysql_user["${database_user}@${zabbix_web}"],
],
}
} # END if $zabbix_web != $zabbix_server
Expand Down
2 changes: 1 addition & 1 deletion manifests/javagateway.pp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
hasrestart => true,
require => [
Package['zabbix-java-gateway'],
File['/etc/zabbix/zabbix_java_gateway.conf']
File['/etc/zabbix/zabbix_java_gateway.conf'],
],
}

Expand Down
6 changes: 3 additions & 3 deletions manifests/proxy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -436,21 +436,21 @@
enable => true,
subscribe => [
File[$proxy_configfile_path],
Class['zabbix::database']
Class['zabbix::database'],
],
require => [
Package["zabbix-proxy-${db}"],
File[$include_dir],
File[$proxy_configfile_path],
Class['zabbix::database']
Class['zabbix::database'],
],
}
}

$before_database = $manage_service ? {
true => [
Service[$proxy_service_name],
Class["zabbix::database::${database_type}"]
Class["zabbix::database::${database_type}"],
],
false => Class["zabbix::database::${database_type}"],
}
Expand Down
22 changes: 4 additions & 18 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,6 @@
default => "${repo_gpg_key_location}/zabbix-official-repo.key",
}

apt::key { 'zabbix-FBABD5F':
id => 'FBABD5FB20255ECAB22EE194D13D58E479EA5ED4',
source => $_gpgkey_zabbix,
}
apt::key { 'zabbix-A1848F5':
id => 'A1848F5352D022B9471D83D0082AB56BA14FE591',
source => $_gpgkey_zabbix,
}
apt::key { 'zabbix-4C3D6F2':
id => '4C3D6F2CC75F5146754FC374D913219AB5333005',
source => $_gpgkey_zabbix,
}

# Debian 11 provides Zabbix 5.0 by default. This can cause problems for 4.0 versions
$pinpriority = $facts['os']['release']['major'] ? {
'11' => 1000,
Expand All @@ -146,11 +133,10 @@
repos => 'main',
release => $releasename,
pin => $pinpriority,
require => [
Apt_key['zabbix-FBABD5F'],
Apt_key['zabbix-A1848F5'],
Apt_key['zabbix-4C3D6F2'],
],
key => {
name => 'zabbix.asc',
source => $_gpgkey_zabbix,
},
}

Apt::Source['zabbix'] -> Package<|tag == 'zabbix'|>
Expand Down
4 changes: 2 additions & 2 deletions manifests/web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
comment => 'redirect all to https',
rewrite_cond => ['%{SERVER_PORT} !^443$'],
rewrite_rule => ["^/(.*)$ https://${zabbix_url}/\$1 [L,R]"],
}
},
],
}
} else {
Expand Down Expand Up @@ -385,7 +385,7 @@
custom_fragment => $apache_vhost_custom_fragment,
rewrites => [
{
rewrite_rule => ['^$ /index.php [L]'] }
rewrite_rule => ['^$ /index.php [L]'] },
],
ssl => $apache_use_ssl,
ssl_cert => $apache_ssl_cert,
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"name": "puppet-zabbix",
"version": "11.0.1-rc0",
Expand Down Expand Up @@ -26,7 +26,7 @@
},
{
"name": "puppetlabs/apt",
"version_requirement": ">= 2.1.0 < 11.0.0"
"version_requirement": ">= 2.1.0 < 12.0.0"
},
{
"name": "puppet/systemd",
Expand Down
4 changes: 1 addition & 3 deletions spec/classes/agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@
# service = facts[:os]['family'] == 'Gentoo' ? 'zabbix-agentd' : 'zabbix-agent'

context 'with all defaults' do
it { is_expected.to contain_selinux__module('zabbix-agent') } if facts[:os]['family'] == 'RedHat'
it { is_expected.to contain_apt__key('zabbix-A1848F5') } if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_apt__key('zabbix-FBABD5F') } if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_selinux__module('zabbix-agent') } if facts[:os]['family'] == 'RedHat'
it { is_expected.to contain_file(include_dir).with_ensure('directory') }

# Make sure package will be installed, service running and ensure of directory.
Expand Down Expand Up @@ -486,7 +484,7 @@
super().merge(systemd: true)
end

it { is_expected.to contain_systemd__unit_file('zabbix-agent.service') }

Check warning on line 487 in spec/classes/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

zabbix::agent on ubuntu-20.04-x86_64 with systemd active Skipped: user package provided instead systemd::unit_file

Check warning on line 487 in spec/classes/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

zabbix::agent on rocky-9-x86_64 with systemd active Skipped: user package provided instead systemd::unit_file

Check warning on line 487 in spec/classes/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

zabbix::agent on rocky-8-x86_64 with systemd active Skipped: user package provided instead systemd::unit_file

Check warning on line 487 in spec/classes/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

zabbix::agent on almalinux-9-x86_64 with systemd active Skipped: user package provided instead systemd::unit_file

Check warning on line 487 in spec/classes/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

zabbix::agent on almalinux-8-x86_64 with systemd active Skipped: user package provided instead systemd::unit_file

Check warning on line 487 in spec/classes/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

zabbix::agent on centos-9-x86_64 with systemd active Skipped: user package provided instead systemd::unit_file

Check warning on line 487 in spec/classes/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

zabbix::agent on oraclelinux-9-x86_64 with systemd active Skipped: user package provided instead systemd::unit_file

Check warning on line 487 in spec/classes/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

zabbix::agent on oraclelinux-8-x86_64 with systemd active Skipped: user package provided instead systemd::unit_file

Check warning on line 487 in spec/classes/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

zabbix::agent on redhat-9-x86_64 with systemd active Skipped: user package provided instead systemd::unit_file

Check warning on line 487 in spec/classes/agent_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

zabbix::agent on redhat-8-x86_64 with systemd active Skipped: user package provided instead systemd::unit_file
end
end

Expand Down
3 changes: 0 additions & 3 deletions spec/classes/javagateway_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
it { is_expected.to contain_service('zabbix-java-gateway').with_ensure('running') }
it { is_expected.to contain_service('zabbix-java-gateway').with_enable('true') }
it { is_expected.to contain_service('zabbix-java-gateway').with_require(['Package[zabbix-java-gateway]', 'File[/etc/zabbix/zabbix_java_gateway.conf]']) }

it { is_expected.to contain_apt__key('zabbix-A1848F5') } if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_apt__key('zabbix-FBABD5F') } if facts[:os]['family'] == 'Debian'
end

context 'when declaring manage_repo is true' do
Expand Down
3 changes: 0 additions & 3 deletions spec/classes/repo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
it { is_expected.to contain_class('zabbix::params') }
it { is_expected.to contain_class('zabbix::repo') }

it { is_expected.to contain_apt__key('zabbix-A1848F5') } if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_apt__key('zabbix-FBABD5F') } if facts[:os]['family'] == 'Debian'

context 'when repo_location is "https://example.com/foo"' do
let :params do
{
Expand Down
2 changes: 0 additions & 2 deletions spec/classes/sender_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
it { is_expected.to contain_yumrepo('zabbix') }
when 'Debian'
it { is_expected.to contain_apt__source('zabbix') }
it { is_expected.to contain_apt__key('zabbix-A1848F5') }
it { is_expected.to contain_apt__key('zabbix-FBABD5F') }
end
end
end
Expand Down
4 changes: 1 addition & 3 deletions spec/classes/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
it { is_expected.to contain_service('zabbix-server').with_ensure('running') }
it { is_expected.not_to contain_zabbix__startup('zabbix-server') }

it { is_expected.to contain_apt__source('zabbix') } if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_apt__key('zabbix-A1848F5') } if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_apt__key('zabbix-FBABD5F') } if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_apt__source('zabbix') } if facts[:os]['family'] == 'Debian'
end

if facts[:os]['family'] == 'RedHat'
Expand Down
2 changes: 0 additions & 2 deletions spec/classes/web_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class { 'apache':
it { is_expected.to contain_class('Zabbix::Repo') }
it { is_expected.to contain_file('/etc/zabbix/web').with_ensure('directory') }

it { is_expected.to contain_apt__key('zabbix-A1848F5') } if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_apt__key('zabbix-FBABD5F') } if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_apt__source('zabbix') } if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_yumrepo('zabbix') } if facts[:os]['family'] == 'RedHat'
it { is_expected.to contain_yumrepo('zabbix-nonsupported') } if facts[:os]['family'] == 'RedHat'
Expand Down
Loading