Skip to content

Instantly share code, notes, and snippets.

@neilmillard
Last active August 29, 2015 14:17
Show Gist options
  • Save neilmillard/2cf3faad9e651e9cf5b6 to your computer and use it in GitHub Desktop.
Save neilmillard/2cf3faad9e651e9cf5b6 to your computer and use it in GitHub Desktop.
class
{
"nm::webserver":
php_date_timezone => $php_date_timezone,
php_memory_limit => $php_memory_limit,
php_upload_max_filesize => $upload_max_filesize,
php_post_max_size => $php_post_max_size,
}
class nm::params
{
$php_date_timezone = 'Europe/London'
$php_memory_limit = '256M'
$php_upload_max_filesize = '30M'
$php_post_max_size = '30M'
}
class nm::webserver
(
$php_date_timezone = $ispconfig::params::php_date_timezone,
$php_memory_limit = $ispconfig::params::php_memory_limit,
$php_upload_max_filesize = $ispconfig::params::upload_max_filesize,
$php_post_max_size = $ispconfig::params::php_post_max_size,
)
{
package
{
'nginx':
require => Class['system'],
ensure => latest,
}
service
{
'nginx':
enable => true,
ensure => running,
hasrestart => true,
hasstatus => true,
require => Package['nginx'],
}
class
{
'php::fpm::daemon':
require => Package['nginx'],
}
php::ini
{
'/etc/php5/php.ini':
display_errors => 'Off',
memory_limit => $php_memory_limit,
expose_php => 'Off',
upload_max_filesize => $php_upload_max_filesize,
post_max_size => $php_post_max_size,
date_timezone => $php_date_timezone,
require => Class['system'],
}
class
{
'php::cli':
inifile => '/etc/php5/php.ini',
require => Class['system'],
}
package
{
"memcached":
ensure => latest,
}
php::module
{
['imagick', 'mysql', 'curl', 'gd', 'intl', 'imap', 'mcrypt', 'memcached', 'memcache', 'ming', 'ps', 'pspell', 'recode', 'snmp', 'sqlite', 'tidy', 'xmlrpc', 'xsl']:
}
package
{
"php-apc":
ensure => latest,
require => Class['php::fpm::daemon']
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment