Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

RHEL/CentOS changes #103

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 32 additions & 14 deletions manifests/ini.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$sapi_target = 'all',
$service = $php::service,
$config_dir = $php::config_dir,
$package = $php::package
$package = $php::package,
) {

include php
Expand All @@ -38,24 +38,42 @@
default => '/',
}

$confd_dir = $::operatingsystem ? {
/(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => 'conf.d/',
default => '',
}

$cli_confd_dir = $::operatingsystem ? {
/(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => 'cli/conf.d/',
default => '',
}

if ($sapi_target == 'all') {

file { "${config_dir}${http_sapi}conf.d/${target}":
ensure => 'present',
content => template($template),
require => Package[$package],
before => File["${config_dir}/cli/conf.d/${target}"],
}
if $confd_dir == $cli_confd_dir {
file { "${config_dir}${http_sapi}${confd_dir}${target}":
ensure => 'present',
content => template($template),
require => Package[$package],
notify => Service[$service],
}
} else {
file { "${config_dir}${http_sapi}${confd_dir}${target}":
ensure => 'present',
content => template($template),
require => Package[$package],
before => File["${config_dir}${cli_confd_dir}${target}"],
}

file { "${config_dir}/cli/conf.d/${target}":
ensure => 'present',
content => template($template),
require => Package[$package],
notify => Service[$service],
file { "${config_dir}${cli_confd_dir}${target}":
ensure => 'present',
content => template($template),
require => Package[$package],
notify => Service[$service],
}
}

}else{
file { "${config_dir}/${sapi_target}/conf.d/${target}":
file { "${config_dir}/${sapi_target}${confd_dir}${target}":
ensure => 'present',
content => template($template),
require => Package[$package],
Expand Down
70 changes: 35 additions & 35 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -149,41 +149,41 @@
#
#
class php (
$package_devel = params_lookup( 'package_devel' ),
$package_pear = params_lookup( 'package_pear' ),
$my_class = params_lookup( 'my_class' ),
$service = params_lookup( 'service' ),
$service_autorestart = params_lookup( 'service_autorestart' ),
$source = params_lookup( 'source' ),
$source_dir = params_lookup( 'source_dir' ),
$source_dir_purge = params_lookup( 'source_dir_purge' ),
$template = params_lookup( 'template' ),
$augeas = params_lookup( 'augeas' ),
$options = params_lookup( 'options' ),
$version = params_lookup( 'version' ),
$install_options = params_lookup( 'install_options' ),
$absent = params_lookup( 'absent' ),
$monitor = params_lookup( 'monitor' , 'global' ),
$monitor_tool = params_lookup( 'monitor_tool' , 'global' ),
$monitor_target = params_lookup( 'monitor_target' , 'global' ),
$puppi = params_lookup( 'puppi' , 'global' ),
$puppi_helper = params_lookup( 'puppi_helper' , 'global' ),
$debug = params_lookup( 'debug' , 'global' ),
$audit_only = params_lookup( 'audit_only' , 'global' ),
$package = params_lookup( 'package' ),
$module_prefix = params_lookup( 'module_prefix' ),
$config_dir = params_lookup( 'config_dir' ),
$config_file = params_lookup( 'config_file' ),
$config_file_mode = params_lookup( 'config_file_mode' ),
$config_file_owner = params_lookup( 'config_file_owner' ),
$config_file_group = params_lookup( 'config_file_group' ),
$config_file_init = params_lookup( 'config_file_init' ),
$pid_file = params_lookup( 'pid_file' ),
$data_dir = params_lookup( 'data_dir' ),
$log_dir = params_lookup( 'log_dir' ),
$log_file = params_lookup( 'log_file' ),
$port = params_lookup( 'port' ),
$protocol = params_lookup( 'protocol' )
$package_devel = $php::params::package_devel,
$package_pear = $php::params::package_pear,
$my_class = $php::params::my_class,
$service = $php::params::service,
$service_autorestart = $php::params::service_autorestart,
$source = $php::params::source,
$source_dir = $php::params::source_dir,
$source_dir_purge = $php::params::source_dir_purge,
$template = $php::params::template,
$augeas = $php::params::augeas,
$options = $php::params::options,
$version = $php::params::version,
$install_options = $php::params::install_options,
$absent = $php::params::absent,
$monitor = $php::params::monitor,
$monitor_tool = $php::params::monitor_tool,
$monitor_target = $php::params::monitor_target,
$puppi = $php::params::puppi,
$puppi_helper = $php::params::puppi_helper,
$debug = $php::params::debug,
$audit_only = $php::params::audit_only,
$package = $php::params::package,
$module_prefix = $php::params::module_prefix,
$config_dir = $php::params::config_dir,
$config_file = $php::params::config_file,
$config_file_mode = $php::params::config_file_mode,
$config_file_owner = $php::params::config_file_owner,
$config_file_group = $php::params::config_file_group,
$config_file_init = $php::params::config_file_init,
$pid_file = $php::params::pid_file,
$data_dir = $php::params::data_dir,
$log_dir = $php::params::log_dir,
$log_file = $php::params::log_file,
$port = $php::params::port,
$protocol = $php::params::protocol,
) inherits php::params {

$bool_service_autorestart=any2bool($service_autorestart)
Expand Down
2 changes: 1 addition & 1 deletion templates/extra-ini.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<%= name %>
<% end %>
<% else -%>
<%= value %>
<%= @value %>
<% end -%>
<% end -%>