Puppet Class: apache::mod::deflate

Defined in:
manifests/mod/deflate.pp

Summary

Installs and configures `mod_deflate`.

Overview

Parameters:

  • types (Array[String]) (defaults to: [ 'text/html text/plain text/xml', 'text/css', 'application/x-javascript application/javascript application/ecmascript', 'application/rss+xml', 'application/json', ])

    An array of MIME types to be deflated. See www.iana.org/assignments/media-types/media-types.xhtml.

  • notes (Hash) (defaults to: { 'Input' => 'instream', 'Output' => 'outstream', 'Ratio' => 'ratio', })

    A Hash where the key represents the type and the value represents the note name.

See Also:



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'manifests/mod/deflate.pp', line 12

class apache::mod::deflate (
  Array[String] $types = [
    'text/html text/plain text/xml',
    'text/css',
    'application/x-javascript application/javascript application/ecmascript',
    'application/rss+xml',
    'application/json',
  ],
  Hash $notes          = {
    'Input'  => 'instream',
    'Output' => 'outstream',
    'Ratio'  => 'ratio',
  }
) {
  include apache
  ::apache::mod { 'deflate': }

  file { 'deflate.conf':
    ensure  => file,
    path    => "${apache::mod_dir}/deflate.conf",
    mode    => $apache::file_mode,
    content => template('apache/mod/deflate.conf.erb'),
    require => Exec["mkdir ${apache::mod_dir}"],
    before  => File[$apache::mod_dir],
    notify  => Class['apache::service'],
  }
}