Commit 10cd0d86 authored by mh's avatar mh
Browse files

linting

parent 2166e81f
# some default stuff for apc
class php::apc::base(
class php::apc::base (
$dir = '/var/www/apc_tmp',
){
Package<| title == 'apache' |> -> file{$dir:
) {
Package<| title == 'apache' |> -> file { $dir:
ensure => directory,
owner => root,
group => 0,
group => 0,
mode => '1777',
}
if str2bool($::selinux) {
$seltype = $::operatingsystemmajrelease ? {
if str2bool($facts['os']['selinux']['enabled']) {
$seltype = $facts['os']['release']['major'] ? {
'5' => 'httpd_sys_script_rw_t',
default => 'httpd_sys_rw_content_t'
}
File[$dir]{
File[$dir] {
seltype => $seltype
}
selinux::fcontext{
selinux::fcontext {
"${dir}(/.*)?":
setype => $seltype,
before => File[$dir];
setype => $seltype,
before => File[$dir];
} -> Service<| title == 'apache' |>
}
}
# an abstracted way of setting the same options for all
define php::apc::settings(){
require ::php::apc::base
file_line{
define php::apc::settings () {
require php::apc::base
file_line {
"comment file apc file mask - ${name}":
line => ';apc.mmap_file_mask=',
match => '.*apc\.mmap_file_mask',
path => $name,
require => File[$php::apc::base::dir],
} -> augeas{"apc_settings_${name}":
} -> augeas { "apc_settings_${name}":
context => "/files${name}/.anon",
changes => [
# http://chrisgilligan.com/wordpress/how-to-configure-apc-cache-on-virtual-servers-with-php-running-under-fcgid/
......
# extensions for all common databases
class php::extensions::alldbs {
include ::php::extensions::mysql
include ::php::extensions::pgsql
include php::extensions::mysql
include php::extensions::pgsql
}
# manage bcmath
class php::extensions::bcmath {
php::package{'bcmath':
php::package { 'bcmath':
mode => 'direct',
}
}
# common php extensions
class php::extensions::common {
php::package{
[ 'common', 'tidy', 'gd' ]:
php::package {
['common', 'tidy', 'gd']:
mode => 'direct';
}
if ($::operatingsystem == 'CentOS') and ($::operatingsystemmajrelease == '5') {
php::package{
if ($facts['os']['name'] == 'CentOS') and ($facts['os']['release']['major'] == '5') {
php::package {
'mhash':
mode => 'direct';
}
} else {
php::package{
php::package {
'intl':
mode => 'direct';
}
}
include ::php::pear::common
include php::pear::common
}
# manage crypt blowfish extensions
class php::extensions::crypt_blowfish {
php::pear{'Crypt-Blowfish': }
php::pear { 'Crypt-Blowfish': }
}
# manage imap extension
class php::extensions::imap {
php::package{'imap':
php::package { 'imap':
mode => 'direct',
}
}
# manage ldap extension
class php::extensions::ldap {
php::package{'ldap':
php::package { 'ldap':
mode => 'direct',
}
}
# manage mcrypt extension
class php::extensions::mcrypt {
php::package{'mcrypt':
php::package { 'mcrypt':
mode => 'direct',
}
}
# manage mysql extension
class php::extensions::mysql {
php::package{'mysql':
php::package { 'mysql':
mode => 'direct',
}
}
class php::extensions::pear::cache_lite {
php::pear{'Cache-Lite': }
php::pear { 'Cache-Lite': }
}
class php::extensions::pear::date {
php::pear{'Date': }
php::pear { 'Date': }
}
class php::extensions::pear::date_holidays {
php::pear{'Date-Holidays': }
php::pear { 'Date-Holidays': }
}
class php::extensions::pear::file {
php::pear{'File': }
php::pear { 'File': }
}
class php::extensions::pear::http_webdav_server {
php::pear{'HTTP_WebDAV_Server':
mode => 'cli',
state => 'beta'
php::pear { 'HTTP_WebDAV_Server':
mode => 'cli',
state => 'beta',
}
}
class php::extensions::pear::mdb2 {
php::pear{'MDB2': }
php::pear { 'MDB2': }
}
class php::extensions::pear::net_dns {
php::pear{'Net_DNS':
php::pear { 'Net_DNS':
mode => 'cli',
}
}
# the Net_UserAgent_Detect package
class php::extensions::pear::net_useragent_detect {
if versioncmp($::operatingsystemmajrelease,'5') > 0 {
package{'php-pear-Net-UserAgent-Detect':
if versioncmp($facts['os']['release']['major'],'5') > 0 {
package { 'php-pear-Net-UserAgent-Detect':
ensure => installed,
}
} else {
php::pear{'Net_UserAgent_Detect':
php::pear { 'Net_UserAgent_Detect':
mode => 'cli',
}
}
......
class php::extensions::pear::xml_serializer {
php::pear{'XML-Serializer': }
php::pear { 'XML-Serializer': }
}
class php::extensions::pecl::fileinfo {
php::pecl{'Fileinfo': }
php::pecl { 'Fileinfo': }
include imagemagick::devel
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment