Cleanup comments from the splitting process

This commit is contained in:
Eric Renfro 2017-02-12 15:46:48 -05:00
parent 9364c8df4c
commit 36067f0c83
No known key found for this signature in database
GPG key ID: 9A949323CBE78F97
2 changed files with 10 additions and 94 deletions

View file

@ -30,65 +30,9 @@ else
Chef::Application.fatal!('Webserver backend can either be apache or nginx', 121) Chef::Application.fatal!('Webserver backend can either be apache or nginx', 121)
end end
include_recipe "#{cookbook_name}::server_php"
##########################
# Setup and Install Apache
# apache_module 'proxy'
# apache_module 'proxy_fcgi'
#
# web_app "zabbix" do
# server_name node['fqdn']
# server_aliases ["zabbix.#{node['domain']}"]
# template %W{
# apache/#{node['platform']}/#{node['platform_version'].to_i}/zabbix.conf.erb
# apache/#{node['platform']}/zabbix.conf.erb
# apache/#{node['platform_family']}/#{node['platform_version'].to_i}/zabbix.conf.erb
# apache/#{node['platform_family']}/zabbix.conf.erb
# apache/default/zabbix.conf.erb
# apache/zabbix.conf.erb
# }
# docroot "/usr/share/zabbix"
# directory_index ["index.php"]
# directory_options [ "FollowSymLinks" ]
# allow_override [ "None" ]
# end
####################### #######################
# Install and Setup PHP # Setup and Install PHP
# case node['platform_family'] include_recipe "#{cookbook_name}::server_php"
# when 'rhel'
# # Remove distro-provided versions if installed
# %w(php php-cli php-pear php-devel php-common).each do |pkg|
# package pkg do
# action :remove
# end
# end
#
# # Setup PHP to use yum-ius packages
# node.default['php']['packages'] = %w(php56u php56u-bcmath php56u-gd php56u-mbstring php56u-xml php56u-xmlrpc php56u-cli php56u-opcache)
# node.default['php']['fpm_package'] = 'php56u-fpm'
# node.default['php']['fpm_user'] = 'php-fpm'
# node.default['php']['fpm_group'] = 'php-fpm'
# node.default['php']['gd']['package'] = 'php56u-gd'
# node.default['php']['apcu']['package'] = 'php56u-pecl-apcu'
# node.default['php']['ldap']['package'] = 'php56u-ldap'
#
# case node['zabbix']['database']['backend']
# when 'postgresql'
# node.default['php']['packages'] += ['php56u-pgsql']
# node.default['php']['postgresql']['package'] = 'php56u-pgsql'
# when 'mysql', 'mariadb', 'percona'
# node.default['php']['packages'] += ['php56u-mysqlnd']
# node.default['php']['mysql']['package'] = 'php56u-mysqlnd'
# end
# end
#
# # Set PHP timezone
# node.default['php']['directives'] = {
# 'date.timezone' => node['zabbix']['php']['timezone']
# }
# include_recipe 'php'
####################### #######################
# Install Zabbix Server # Install Zabbix Server
@ -103,39 +47,6 @@ when 'mysql', 'mariadb', 'percona'
end end
end end
#############################
# Install PHP-FPM Zabbix pool
# php_fpm_pool 'zabbix' do
# listen '127.0.0.1:9001'
# user 'php-fpm'
# group 'php-fpm'
# chdir '/usr/share/zabbix'
# max_children 50
# start_servers 5
# min_spare_servers 5
# max_spare_servers 35
# additional_config({
# 'pm.process_idle_timeout' => '10s',
# 'pm.max_requests' => '500',
# 'ping.path' => '/ping',
# 'ping.response' => 'pong',
# 'php_flag[display_errors]' => 'off',
# 'php_admin_value[error_log]' => '/var/log/php-fpm/www-error.log',
# 'php_admin_flag[log_errors]' => 'on',
# 'php_admin_value[memory_limit]' => '128M',
# 'php_value[session.save_handler]' => 'files',
# 'php_value[session.save_path]' => '/var/lib/php-fpm/session',
# 'php_value[soap.wsdl_cache_dir]' => '/var/lib/php-fpm/wsdlcache',
# 'php_value[max_execution_time]' => '300',
# 'php_value[post_max_size]' => '16M',
# 'php_value[upload_max_filesize]' => '2M',
# 'php_value[max_input_time]' => '300',
# 'php_value[always_populate_raw_post_data]' => '-1'
# })
# action :install
# only_if { node['zabbix']['php']['use_fpm'] }
# end
######################### #########################
# Configure Zabbix Server # Configure Zabbix Server
template "/etc/zabbix/zabbix_server.conf" do template "/etc/zabbix/zabbix_server.conf" do
@ -165,7 +76,6 @@ end
directory "/etc/zabbix/web" do directory "/etc/zabbix/web" do
mode "0750" mode "0750"
owner "root" owner "root"
#group "php-fpm"
group case node['zabbix']['php']['use_fpm'] group case node['zabbix']['php']['use_fpm']
when true when true
node['php']['fpm_group'] node['php']['fpm_group']
@ -199,7 +109,6 @@ template "/etc/zabbix/web/zabbix.conf.php" do
sensitive true sensitive true
mode "0640" mode "0640"
owner "root" owner "root"
#group "php-fpm"
group case node['zabbix']['php']['use_fpm'] group case node['zabbix']['php']['use_fpm']
when true when true
node['php']['fpm_group'] node['php']['fpm_group']
@ -227,7 +136,6 @@ template "/etc/zabbix/web/maintenance.inc.php" do
sensitive true sensitive true
mode "0640" mode "0640"
owner "root" owner "root"
#group "php-fpm"
group case node['zabbix']['php']['use_fpm'] group case node['zabbix']['php']['use_fpm']
when true when true
node['php']['fpm_group'] node['php']['fpm_group']

View file

@ -21,4 +21,12 @@ nginx_site "zabbix" do
nginx/default/#{tname}.conf.erb nginx/default/#{tname}.conf.erb
nginx/#{tname}.conf.erb nginx/#{tname}.conf.erb
} }
variables({
:params => {
:server_port => node['nginx']['port'],
:server_name => "#{node['fqdn']}, zabbix.#{node['domain']}",
:docroot => '/usr/share/zabbix',
}
})
end end