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 {