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