Puppet Class: apache::mod::pagespeed
- Defined in:
- manifests/mod/pagespeed.pp
Summary
Installs and manages mod_pagespeed, which is a Google module that rewrites web pages to reduce latency and bandwidth. This module does *not* manage the software repositories needed to automatically install the mod-pagespeed-stable package. The module does however require that the package be installed, or be installable using the system's default package provider. You should ensure that this pre-requisite is met or declaring `apache::mod::pagespeed` will cause the puppet run to fail.Overview
Note:
Verify that your system is compatible with the latest Google Pagespeed requirements.
Although this apache module requires the mod-pagespeed-stable package, Puppet does not manage the software repositories required to automatically install the package. If you declare this class when the package is either not installed or not available to your package manager, your Puppet run will fail.
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'manifests/mod/pagespeed.pp', line 159
class apache::mod::pagespeed (
String $inherit_vhost_config = 'on',
Boolean $filter_xhtml = false,
Stdlib::Absolutepath $cache_path = '/var/cache/mod_pagespeed/',
Stdlib::Absolutepath $log_dir = '/var/log/pagespeed',
Array $memcache_servers = [],
String $rewrite_level = 'CoreFilters',
Array $disable_filters = [],
Array $enable_filters = [],
Array $forbid_filters = [],
Integer $rewrite_deadline_per_flush_ms = 10,
Optional[String] $additional_domains = undef,
Integer $file_cache_size_kb = 102400,
Integer $file_cache_clean_interval_ms = 3600000,
Integer $lru_cache_per_process = 1024,
Integer $lru_cache_byte_limit = 16384,
Integer $css_flatten_max_bytes = 2048,
Integer $css_inline_max_bytes = 2048,
Integer $css_image_inline_max_bytes = 2048,
Integer $image_inline_max_bytes = 2048,
Integer $js_inline_max_bytes = 2048,
Integer $css_outline_min_bytes = 3000,
Integer $js_outline_min_bytes = 3000,
Integer $inode_limit = 500000,
Integer $image_max_rewrites_at_once = 8,
Integer $num_rewrite_threads = 4,
Integer $num_expensive_rewrite_threads = 4,
String $collect_statistics = 'on',
String $statistics_logging = 'on',
Array $allow_view_stats = [],
Array $allow_pagespeed_console = [],
Array $allow_pagespeed_message = [],
Integer $message_buffer_size = 100000,
Variant[Array, Hash] $additional_configuration = {},
Optional[String] $apache_version = undef,
Optional[String] $package_ensure = undef,
) {
include apache
$_apache_version = pick($apache_version, $apache::apache_version)
$_lib = $_apache_version ? {
'2.4' => 'mod_pagespeed_ap24.so',
default => undef
}
apache::mod { 'pagespeed':
lib => $_lib,
package_ensure => $package_ensure,
}
# Template uses $_apache_version
file { 'pagespeed.conf':
ensure => file,
path => "${apache::mod_dir}/pagespeed.conf",
mode => $apache::file_mode,
content => template('apache/mod/pagespeed.conf.erb'),
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}
|