Skip to content

Commit

Permalink
Include apache::mod::php if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Nov 6, 2023
1 parent 7f9ba73 commit 215c5b7
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 22 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ node 'zabbix.example.com' {
class { 'apache':
mpm_module => 'prefork',
}
include apache::mod::php

class { 'zabbix':
zabbix_url => 'zabbix.example.com',
Expand All @@ -150,7 +149,6 @@ node 'zabbix.example.com' {
class { 'apache':
mpm_module => 'prefork',
}
include apache::mod::php

class { 'zabbix':
zabbix_url => 'zabbix.example.com',
Expand Down
1 change: 0 additions & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion manifests/web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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}
Expand Down
3 changes: 0 additions & 3 deletions spec/acceptance/zabbix_application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 0 additions & 3 deletions spec/acceptance/zabbix_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 0 additions & 3 deletions spec/acceptance/zabbix_hostgroup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 0 additions & 3 deletions spec/acceptance/zabbix_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 0 additions & 3 deletions spec/acceptance/zabbix_template_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 0 additions & 3 deletions spec/acceptance/zabbix_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
10 changes: 10 additions & 0 deletions spec/classes/web_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 215c5b7

Please sign in to comment.