From 21a1a355b6cd72a50137eb9452bdd78e51f312fb Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 6 Nov 2023 22:42:12 +0100 Subject: [PATCH 1/4] Use include postgresql::server in zabbix::database This is safe to do because it can be called even after an explicit class statement. The following code is legal. class { 'postgresql::server': } include postgresql::server It could make a difference for a remote database, but due to the usage of postgresql::server::pg_hba_rule that was already invalid. The explicit require is also not needed, since postgresql::server::db already does this where needed. The end result is that the module is easier to use. --- README.md | 4 ---- manifests/database.pp | 3 ++- spec/acceptance/server_spec.rb | 2 -- spec/acceptance/zabbix_application_spec.rb | 3 +-- spec/acceptance/zabbix_host_spec.rb | 3 +-- spec/acceptance/zabbix_hostgroup_spec.rb | 3 +-- spec/acceptance/zabbix_proxy_spec.rb | 3 +-- spec/acceptance/zabbix_template_host_spec.rb | 3 +-- spec/acceptance/zabbix_template_spec.rb | 3 +-- spec/classes/database_spec.rb | 1 - spec/classes/proxy_spec.rb | 3 +-- 11 files changed, 9 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index a79d74e12..5c841a837 100644 --- a/README.md +++ b/README.md @@ -138,8 +138,6 @@ node 'zabbix.example.com' { } include apache::mod::php - class { 'postgresql::server': } - class { 'zabbix': zabbix_url => 'zabbix.example.com', } @@ -215,8 +213,6 @@ Like the zabbix-server, the zabbix-proxy can also be used in 2 ways: The following is an example for using the PostgreSQL as database: ```ruby node 'proxy.example.com' { - class { 'postgresql::server': } - class { 'zabbix::database': database_type => 'postgresql', } diff --git a/manifests/database.pp b/manifests/database.pp index 5599cba45..1e7cfc283 100644 --- a/manifests/database.pp +++ b/manifests/database.pp @@ -94,12 +94,13 @@ case $database_type { 'postgresql': { # This is the PostgreSQL part. + + include postgresql::server # Create the postgres database. postgresql::server::db { $database_name: user => $database_user, owner => $database_user, password => postgresql::postgresql_password($database_user, $database_password), - require => Class['postgresql::server'], tablespace => $database_tablespace, } diff --git a/spec/acceptance/server_spec.rb b/spec/acceptance/server_spec.rb index 337267926..fce93a16f 100644 --- a/spec/acceptance/server_spec.rb +++ b/spec/acceptance/server_spec.rb @@ -23,7 +23,6 @@ class { 'postgresql::globals': manage_dnf_module => $facts['os']['release']['major'] == '8', version => '13', } - -> class { 'postgresql::server': } -> class { 'zabbix::database': } -> class { 'zabbix::server': } EOS @@ -73,7 +72,6 @@ class { 'postgresql::globals': manage_dnf_module => $facts['os']['release']['major'] == '8', version => '13', } - -> class { 'postgresql::server': } -> class { 'zabbix::database': } -> class { 'zabbix::server': zabbix_version => "#{zabbix_version}" diff --git a/spec/acceptance/zabbix_application_spec.rb b/spec/acceptance/zabbix_application_spec.rb index 065aa02ed..226763fdf 100644 --- a/spec/acceptance/zabbix_application_spec.rb +++ b/spec/acceptance/zabbix_application_spec.rb @@ -33,7 +33,6 @@ class { 'postgresql::globals': manage_dnf_module => $facts['os']['release']['major'] == '8', version => '13', } - -> class { 'postgresql::server': } class { 'zabbix': zabbix_version => "#{zabbix_version}", @@ -42,7 +41,7 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => [ Class['postgresql::server'], Class['apache'], ], + require => Class['apache'], } EOS diff --git a/spec/acceptance/zabbix_host_spec.rb b/spec/acceptance/zabbix_host_spec.rb index 993fafd71..c24a8e23d 100644 --- a/spec/acceptance/zabbix_host_spec.rb +++ b/spec/acceptance/zabbix_host_spec.rb @@ -42,7 +42,6 @@ class { 'postgresql::globals': manage_dnf_module => $facts['os']['release']['major'] == '8', version => '13', } - -> class { 'postgresql::server': } class { 'zabbix': zabbix_version => "#{zabbix_version}", @@ -51,7 +50,7 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => [ Class['postgresql::server'], Class['apache'], ], + require => Class['apache'], } EOS diff --git a/spec/acceptance/zabbix_hostgroup_spec.rb b/spec/acceptance/zabbix_hostgroup_spec.rb index 32c4a3845..df0985e78 100644 --- a/spec/acceptance/zabbix_hostgroup_spec.rb +++ b/spec/acceptance/zabbix_hostgroup_spec.rb @@ -26,7 +26,6 @@ class { 'postgresql::globals': manage_dnf_module => $facts['os']['release']['major'] == '8', version => '13', } - -> class { 'postgresql::server': } class { 'zabbix': zabbix_version => "#{zabbix_version}", @@ -35,7 +34,7 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => [ Class['postgresql::server'], Class['apache'], ], + require => Class['apache'], } EOS diff --git a/spec/acceptance/zabbix_proxy_spec.rb b/spec/acceptance/zabbix_proxy_spec.rb index d92d709b7..da1547cb1 100644 --- a/spec/acceptance/zabbix_proxy_spec.rb +++ b/spec/acceptance/zabbix_proxy_spec.rb @@ -27,7 +27,6 @@ class { 'postgresql::globals': manage_dnf_module => $facts['os']['release']['major'] == '8', version => '13', } - -> class { 'postgresql::server': } class { 'zabbix': zabbix_version => "#{zabbix_version}", @@ -36,7 +35,7 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => [ Class['postgresql::server'], Class['apache'], ], + require => Class['apache'], } EOS diff --git a/spec/acceptance/zabbix_template_host_spec.rb b/spec/acceptance/zabbix_template_host_spec.rb index cd7db3fa2..a45b1adcc 100644 --- a/spec/acceptance/zabbix_template_host_spec.rb +++ b/spec/acceptance/zabbix_template_host_spec.rb @@ -35,7 +35,6 @@ class { 'postgresql::globals': manage_dnf_module => $facts['os']['release']['major'] == '8', version => '13', } - -> class { 'postgresql::server': } class { 'zabbix': zabbix_version => "#{zabbix_version}", @@ -44,7 +43,7 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => [ Class['postgresql::server'], Class['apache'], ], + require => Class['apache'], } EOS diff --git a/spec/acceptance/zabbix_template_spec.rb b/spec/acceptance/zabbix_template_spec.rb index fe025c7a6..c0fd9ba5f 100644 --- a/spec/acceptance/zabbix_template_spec.rb +++ b/spec/acceptance/zabbix_template_spec.rb @@ -26,7 +26,6 @@ class { 'postgresql::globals': manage_dnf_module => $facts['os']['release']['major'] == '8', version => '13', } - -> class { 'postgresql::server': } class { 'zabbix': zabbix_version => "#{zabbix_version}", @@ -35,7 +34,7 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => [ Class['postgresql::server'], Class['apache'], ], + require => Class['apache'], } EOS diff --git a/spec/classes/database_spec.rb b/spec/classes/database_spec.rb index 9fa476c1d..2c2f4b0cc 100644 --- a/spec/classes/database_spec.rb +++ b/spec/classes/database_spec.rb @@ -17,7 +17,6 @@ let :pre_condition do <<-EOS - include 'postgresql::server' if $facts['os']['family'] == 'Gentoo' { # We don't need the package to be installed as its the same for the server. class { 'mysql::client': diff --git a/spec/classes/proxy_spec.rb b/spec/classes/proxy_spec.rb index 4dbbed9c9..7e3b171a3 100644 --- a/spec/classes/proxy_spec.rb +++ b/spec/classes/proxy_spec.rb @@ -28,8 +28,7 @@ end else let :pre_condition do - "include 'postgresql::server' - include 'mysql::server'" + "include 'mysql::server'" end let :params do { From 7f9ba732e4915e20f973fda4eddba0c017a6c772 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 6 Nov 2023 23:35:19 +0100 Subject: [PATCH 2/4] include mysql::server if needed This is similar to the inclusion of postgresql::server if needed. --- README.md | 4 ---- manifests/database.pp | 1 + spec/classes/database_mysql_spec.rb | 4 ---- spec/classes/database_spec.rb | 1 - spec/classes/proxy_spec.rb | 7 ------- 5 files changed, 1 insertion(+), 16 deletions(-) diff --git a/README.md b/README.md index 5c841a837..5191c3feb 100644 --- a/README.md +++ b/README.md @@ -152,8 +152,6 @@ node 'zabbix.example.com' { } include apache::mod::php - class { 'mysql::server': } - class { 'zabbix': zabbix_url => 'zabbix.example.com', database_type => 'mysql', @@ -227,8 +225,6 @@ node 'proxy.example.com' { When you want to make use of an MySQL database as backend: ```ruby node 'proxy.example.com' { - class { 'mysql::server': } - class { 'zabbix::database': database_type => 'mysql', } diff --git a/manifests/database.pp b/manifests/database.pp index 1e7cfc283..c78f266ee 100644 --- a/manifests/database.pp +++ b/manifests/database.pp @@ -146,6 +146,7 @@ } 'mysql': { # This is the MySQL part. + include mysql::server # First we check what kind of zabbix component it is. We have to use clear names # as it may be confusing when you need to fill in the zabbix-proxy name into the diff --git a/spec/classes/database_mysql_spec.rb b/spec/classes/database_mysql_spec.rb index 8223aa41f..60a770c23 100644 --- a/spec/classes/database_mysql_spec.rb +++ b/spec/classes/database_mysql_spec.rb @@ -7,10 +7,6 @@ 'rspec.puppet.com' end - let :pre_condition do - "include 'mysql::server'" - end - on_supported_os(baseline_os_hash).each do |os, facts| next if facts[:os]['name'] == 'windows' diff --git a/spec/classes/database_spec.rb b/spec/classes/database_spec.rb index 2c2f4b0cc..809e6d852 100644 --- a/spec/classes/database_spec.rb +++ b/spec/classes/database_spec.rb @@ -23,7 +23,6 @@ class { 'mysql::client': package_manage => false, } } - include 'mysql::server' EOS end diff --git a/spec/classes/proxy_spec.rb b/spec/classes/proxy_spec.rb index 7e3b171a3..edfdf2302 100644 --- a/spec/classes/proxy_spec.rb +++ b/spec/classes/proxy_spec.rb @@ -27,9 +27,6 @@ it { is_expected.not_to compile } end else - let :pre_condition do - "include 'mysql::server'" - end let :params do { zabbix_server_host: '192.168.1.1', @@ -132,10 +129,6 @@ } end - let(:pre_condition) do - "include 'mysql::server'" - end - it { is_expected.to contain_class('zabbix::database::mysql').with_zabbix_type('proxy') } it { is_expected.to contain_class('zabbix::database::mysql').with_zabbix_version(zabbix_version) } it { is_expected.to contain_class('zabbix::database::mysql').with_database_name('zabbix_proxy') } From 215c5b783c1119a06a7717ca45671266a6968908 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 6 Nov 2023 23:19:44 +0100 Subject: [PATCH 3/4] Include apache::mod::php if needed --- README.md | 2 -- REFERENCE.md | 1 - manifests/web.pp | 3 ++- spec/acceptance/zabbix_application_spec.rb | 3 --- spec/acceptance/zabbix_host_spec.rb | 3 --- spec/acceptance/zabbix_hostgroup_spec.rb | 3 --- spec/acceptance/zabbix_proxy_spec.rb | 3 --- spec/acceptance/zabbix_template_host_spec.rb | 3 --- spec/acceptance/zabbix_template_spec.rb | 3 --- spec/classes/web_spec.rb | 10 ++++++++++ 10 files changed, 12 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 5191c3feb..c0316332c 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,6 @@ node 'zabbix.example.com' { class { 'apache': mpm_module => 'prefork', } - include apache::mod::php class { 'zabbix': zabbix_url => 'zabbix.example.com', @@ -150,7 +149,6 @@ node 'zabbix.example.com' { class { 'apache': mpm_module => 'prefork', } - include apache::mod::php class { 'zabbix': zabbix_url => 'zabbix.example.com', diff --git a/REFERENCE.md b/REFERENCE.md index 340be403f..525cbff69 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -4936,7 +4936,6 @@ node 'wdpuppet02.dj-wasabi.local' { class { 'apache': mpm_module => 'prefork', } - class { 'apache::mod::php': } class { 'zabbix::web': zabbix_url => 'zabbix.dj-wasabi.nl', zabbix_server => 'wdpuppet03.dj-wasabi.local', diff --git a/manifests/web.pp b/manifests/web.pp index 8060bea21..18116e556 100644 --- a/manifests/web.pp +++ b/manifests/web.pp @@ -82,7 +82,6 @@ # class { 'apache': # mpm_module => 'prefork', # } -# class { 'apache::mod::php': } # class { 'zabbix::web': # zabbix_url => 'zabbix.dj-wasabi.nl', # zabbix_server => 'wdpuppet03.dj-wasabi.local', @@ -343,6 +342,8 @@ } } else { + include apache::mod::php + $apache_vhost_custom_fragment = " php_value max_execution_time ${apache_php_max_execution_time} php_value memory_limit ${apache_php_memory_limit} diff --git a/spec/acceptance/zabbix_application_spec.rb b/spec/acceptance/zabbix_application_spec.rb index 226763fdf..d93d8821b 100644 --- a/spec/acceptance/zabbix_application_spec.rb +++ b/spec/acceptance/zabbix_application_spec.rb @@ -24,9 +24,6 @@ class { 'apache': mpm_module => 'prefork', } - if $facts['os']['family'] != 'RedHat' { - include apache::mod::php - } class { 'postgresql::globals': locale => 'en_US.UTF-8', manage_package_repo => $facts['os']['release']['major'] != '8', diff --git a/spec/acceptance/zabbix_host_spec.rb b/spec/acceptance/zabbix_host_spec.rb index c24a8e23d..7357a7c74 100644 --- a/spec/acceptance/zabbix_host_spec.rb +++ b/spec/acceptance/zabbix_host_spec.rb @@ -33,9 +33,6 @@ class { 'apache': mpm_module => 'prefork', } - if $facts['os']['family'] != 'RedHat' { - include apache::mod::php - } class { 'postgresql::globals': locale => 'en_US.UTF-8', manage_package_repo => $facts['os']['release']['major'] != '8', diff --git a/spec/acceptance/zabbix_hostgroup_spec.rb b/spec/acceptance/zabbix_hostgroup_spec.rb index df0985e78..70f49d943 100644 --- a/spec/acceptance/zabbix_hostgroup_spec.rb +++ b/spec/acceptance/zabbix_hostgroup_spec.rb @@ -17,9 +17,6 @@ class { 'apache': mpm_module => 'prefork', } - if $facts['os']['family'] != 'RedHat' { - include apache::mod::php - } class { 'postgresql::globals': locale => 'en_US.UTF-8', manage_package_repo => $facts['os']['release']['major'] != '8', diff --git a/spec/acceptance/zabbix_proxy_spec.rb b/spec/acceptance/zabbix_proxy_spec.rb index da1547cb1..14fd880e2 100644 --- a/spec/acceptance/zabbix_proxy_spec.rb +++ b/spec/acceptance/zabbix_proxy_spec.rb @@ -18,9 +18,6 @@ class { 'apache': mpm_module => 'prefork', } - if $facts['os']['family'] != 'RedHat' { - include apache::mod::php - } class { 'postgresql::globals': locale => 'en_US.UTF-8', manage_package_repo => $facts['os']['release']['major'] != '8', diff --git a/spec/acceptance/zabbix_template_host_spec.rb b/spec/acceptance/zabbix_template_host_spec.rb index a45b1adcc..c35989f7e 100644 --- a/spec/acceptance/zabbix_template_host_spec.rb +++ b/spec/acceptance/zabbix_template_host_spec.rb @@ -26,9 +26,6 @@ class { 'apache': mpm_module => 'prefork', } - if $facts['os']['family'] != 'RedHat' { - include apache::mod::php - } class { 'postgresql::globals': locale => 'en_US.UTF-8', manage_package_repo => $facts['os']['release']['major'] != '8', diff --git a/spec/acceptance/zabbix_template_spec.rb b/spec/acceptance/zabbix_template_spec.rb index c0fd9ba5f..1bd07a3bf 100644 --- a/spec/acceptance/zabbix_template_spec.rb +++ b/spec/acceptance/zabbix_template_spec.rb @@ -17,9 +17,6 @@ class { 'apache': mpm_module => 'prefork', } - if $facts['os']['family'] != 'RedHat' { - include apache::mod::php - } class { 'postgresql::globals': locale => 'en_US.UTF-8', manage_package_repo => $facts['os']['release']['major'] != '8', diff --git a/spec/classes/web_spec.rb b/spec/classes/web_spec.rb index 936fb93e1..babbb0bd0 100644 --- a/spec/classes/web_spec.rb +++ b/spec/classes/web_spec.rb @@ -14,6 +14,16 @@ } end + let :pre_condition do + <<~PUPPET + if $facts['os']['family'] != 'RedHat' { + class { 'apache': + mpm_module => 'prefork', + } + } + PUPPET + end + on_supported_os(baseline_os_hash).each do |os, facts| supported_versions.each do |zabbix_version| next if facts[:os]['name'] == 'windows' From 56e30df0f31055fe2dfa59f3aee7ddad60b7d7de Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 6 Nov 2023 23:24:07 +0100 Subject: [PATCH 4/4] Provide Apache & PostgreSQL params via Hiera By using beaker-hiera there is no need to provide it in every acceptance test. --- spec/acceptance/hieradata/common.yaml | 7 +++++++ spec/acceptance/hieradata/os/RedHat/8.yaml | 3 +++ spec/acceptance/server_spec.rb | 18 ++---------------- spec/acceptance/zabbix_application_spec.rb | 11 ----------- spec/acceptance/zabbix_host_spec.rb | 11 ----------- spec/acceptance/zabbix_hostgroup_spec.rb | 11 ----------- spec/acceptance/zabbix_proxy_spec.rb | 11 ----------- spec/acceptance/zabbix_template_host_spec.rb | 11 ----------- spec/acceptance/zabbix_template_spec.rb | 11 ----------- 9 files changed, 12 insertions(+), 82 deletions(-) create mode 100644 spec/acceptance/hieradata/common.yaml create mode 100644 spec/acceptance/hieradata/os/RedHat/8.yaml diff --git a/spec/acceptance/hieradata/common.yaml b/spec/acceptance/hieradata/common.yaml new file mode 100644 index 000000000..d5ac2403c --- /dev/null +++ b/spec/acceptance/hieradata/common.yaml @@ -0,0 +1,7 @@ +--- +apache::mpm_module: 'prefork' + +postgresql::globals::encoding: 'UTF-8' +postgresql::globals::locale: 'en_US.UTF-8' +postgresql::globals::manage_package_repo: true +postgresql::globals::version: '13' diff --git a/spec/acceptance/hieradata/os/RedHat/8.yaml b/spec/acceptance/hieradata/os/RedHat/8.yaml new file mode 100644 index 000000000..847b24863 --- /dev/null +++ b/spec/acceptance/hieradata/os/RedHat/8.yaml @@ -0,0 +1,3 @@ +--- +postgresql::globals::manage_dnf_module: true +postgresql::globals::manage_package_repo: false diff --git a/spec/acceptance/server_spec.rb b/spec/acceptance/server_spec.rb index fce93a16f..73069a892 100644 --- a/spec/acceptance/server_spec.rb +++ b/spec/acceptance/server_spec.rb @@ -16,14 +16,7 @@ # this will actually deploy apache + postgres + zabbix-server + zabbix-web pp = <<-EOS - class { 'postgresql::globals': - encoding => 'UTF-8', - locale => 'en_US.UTF-8', - manage_package_repo => $facts['os']['release']['major'] != '8', - manage_dnf_module => $facts['os']['release']['major'] == '8', - version => '13', - } - -> class { 'zabbix::database': } + class { 'zabbix::database': } -> class { 'zabbix::server': } EOS @@ -65,14 +58,7 @@ class { 'postgresql::globals': # this will actually deploy apache + postgres + zabbix-server + zabbix-web pp = <<-EOS - class { 'postgresql::globals': - encoding => 'UTF-8', - locale => 'en_US.UTF-8', - manage_package_repo => $facts['os']['release']['major'] != '8', - manage_dnf_module => $facts['os']['release']['major'] == '8', - version => '13', - } - -> class { 'zabbix::database': } + class { 'zabbix::database': } -> class { 'zabbix::server': zabbix_version => "#{zabbix_version}" } diff --git a/spec/acceptance/zabbix_application_spec.rb b/spec/acceptance/zabbix_application_spec.rb index d93d8821b..4e5534dfb 100644 --- a/spec/acceptance/zabbix_application_spec.rb +++ b/spec/acceptance/zabbix_application_spec.rb @@ -21,16 +21,6 @@ # This will deploy a running Zabbix setup (server, web, db) which we can # use for custom type tests pp1 = <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'postgresql::globals': - locale => 'en_US.UTF-8', - manage_package_repo => $facts['os']['release']['major'] != '8', - manage_dnf_module => $facts['os']['release']['major'] == '8', - version => '13', - } - class { 'zabbix': zabbix_version => "#{zabbix_version}", zabbix_url => 'localhost', @@ -38,7 +28,6 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => Class['apache'], } EOS diff --git a/spec/acceptance/zabbix_host_spec.rb b/spec/acceptance/zabbix_host_spec.rb index 7357a7c74..834c880a7 100644 --- a/spec/acceptance/zabbix_host_spec.rb +++ b/spec/acceptance/zabbix_host_spec.rb @@ -30,16 +30,6 @@ end pp1 = <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'postgresql::globals': - locale => 'en_US.UTF-8', - manage_package_repo => $facts['os']['release']['major'] != '8', - manage_dnf_module => $facts['os']['release']['major'] == '8', - version => '13', - } - class { 'zabbix': zabbix_version => "#{zabbix_version}", zabbix_url => 'localhost', @@ -47,7 +37,6 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => Class['apache'], } EOS diff --git a/spec/acceptance/zabbix_hostgroup_spec.rb b/spec/acceptance/zabbix_hostgroup_spec.rb index 70f49d943..4ce4a2d4d 100644 --- a/spec/acceptance/zabbix_hostgroup_spec.rb +++ b/spec/acceptance/zabbix_hostgroup_spec.rb @@ -14,16 +14,6 @@ # This will deploy a running Zabbix setup (server, web, db) which we can # use for custom type tests pp1 = <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'postgresql::globals': - locale => 'en_US.UTF-8', - manage_package_repo => $facts['os']['release']['major'] != '8', - manage_dnf_module => $facts['os']['release']['major'] == '8', - version => '13', - } - class { 'zabbix': zabbix_version => "#{zabbix_version}", zabbix_url => 'localhost', @@ -31,7 +21,6 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => Class['apache'], } EOS diff --git a/spec/acceptance/zabbix_proxy_spec.rb b/spec/acceptance/zabbix_proxy_spec.rb index 14fd880e2..6566fe27a 100644 --- a/spec/acceptance/zabbix_proxy_spec.rb +++ b/spec/acceptance/zabbix_proxy_spec.rb @@ -15,16 +15,6 @@ # This will deploy a running Zabbix setup (server, web, db) which we can # use for custom type tests pp1 = <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'postgresql::globals': - locale => 'en_US.UTF-8', - manage_package_repo => $facts['os']['release']['major'] != '8', - manage_dnf_module => $facts['os']['release']['major'] == '8', - version => '13', - } - class { 'zabbix': zabbix_version => "#{zabbix_version}", zabbix_url => 'localhost', @@ -32,7 +22,6 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => Class['apache'], } EOS diff --git a/spec/acceptance/zabbix_template_host_spec.rb b/spec/acceptance/zabbix_template_host_spec.rb index c35989f7e..df1d5c711 100644 --- a/spec/acceptance/zabbix_template_host_spec.rb +++ b/spec/acceptance/zabbix_template_host_spec.rb @@ -23,16 +23,6 @@ # This will deploy a running Zabbix setup (server, web, db) which we can # use for custom type tests pp1 = <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'postgresql::globals': - locale => 'en_US.UTF-8', - manage_package_repo => $facts['os']['release']['major'] != '8', - manage_dnf_module => $facts['os']['release']['major'] == '8', - version => '13', - } - class { 'zabbix': zabbix_version => "#{zabbix_version}", zabbix_url => 'localhost', @@ -40,7 +30,6 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => Class['apache'], } EOS diff --git a/spec/acceptance/zabbix_template_spec.rb b/spec/acceptance/zabbix_template_spec.rb index 1bd07a3bf..cfb5f2218 100644 --- a/spec/acceptance/zabbix_template_spec.rb +++ b/spec/acceptance/zabbix_template_spec.rb @@ -14,16 +14,6 @@ # This will deploy a running Zabbix setup (server, web, db) which we can # use for custom type tests pp1 = <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'postgresql::globals': - locale => 'en_US.UTF-8', - manage_package_repo => $facts['os']['release']['major'] != '8', - manage_dnf_module => $facts['os']['release']['major'] == '8', - version => '13', - } - class { 'zabbix': zabbix_version => "#{zabbix_version}", zabbix_url => 'localhost', @@ -31,7 +21,6 @@ class { 'zabbix': zabbix_api_pass => 'zabbix', apache_use_ssl => false, manage_resources => true, - require => Class['apache'], } EOS