comparison modules/apache/manifests/mod/ssl.pp @ 36:37675581a273 puppet-3.6

Update Puppet module for Apache (pulls in concat module)
author IBBoard <dev@ibboard.co.uk>
date Sat, 14 Mar 2015 20:07:04 +0000
parents 956e484adc12
children 675c1cc61eaf
comparison
equal deleted inserted replaced
35:1bb941522ebf 36:37675581a273
1 class apache::mod::ssl ( 1 class apache::mod::ssl (
2 $ssl_compression = false, 2 $ssl_compression = false,
3 $ssl_options = [ 'StdEnvVars' ], 3 $ssl_options = [ 'StdEnvVars' ],
4 $ssl_cipher = 'HIGH:MEDIUM:!aNULL:!MD5', 4 $ssl_cipher = 'HIGH:MEDIUM:!aNULL:!MD5',
5 $apache_version = $::apache::apache_version, 5 $ssl_protocol = [ 'all', '-SSLv2', '-SSLv3' ],
6 $ssl_pass_phrase_dialog = 'builtin',
7 $ssl_random_seed_bytes = '512',
8 $apache_version = $::apache::apache_version,
9 $package_name = undef,
6 ) { 10 ) {
7 $session_cache = $::osfamily ? { 11 $session_cache = $::osfamily ? {
8 'debian' => '${APACHE_RUN_DIR}/ssl_scache(512000)', 12 'debian' => "\${APACHE_RUN_DIR}/ssl_scache(512000)",
9 'redhat' => '/var/cache/mod_ssl/scache(512000)', 13 'redhat' => '/var/cache/mod_ssl/scache(512000)',
10 'freebsd' => '/var/run/ssl_scache(512000)', 14 'freebsd' => '/var/run/ssl_scache(512000)',
11 } 15 }
12 16
13 case $::osfamily { 17 case $::osfamily {
14 'debian': { 18 'debian': {
15 if $apache_version >= 2.4 and $::operatingsystem == 'Ubuntu' { 19 if versioncmp($apache_version, '2.4') >= 0 {
16 $ssl_mutex = 'default' 20 $ssl_mutex = 'default'
17 } elsif $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '10.04' { 21 } elsif $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '10.04' {
18 $ssl_mutex = 'file:/var/run/apache2/ssl_mutex' 22 $ssl_mutex = 'file:/var/run/apache2/ssl_mutex'
19 } else { 23 } else {
20 $ssl_mutex = 'file:${APACHE_RUN_DIR}/ssl_mutex' 24 $ssl_mutex = "file:\${APACHE_RUN_DIR}/ssl_mutex"
21 } 25 }
22 } 26 }
23 'redhat': { 27 'redhat': {
24 $ssl_mutex = 'default' 28 $ssl_mutex = 'default'
25 } 29 }
29 default: { 33 default: {
30 fail("Unsupported osfamily ${::osfamily}") 34 fail("Unsupported osfamily ${::osfamily}")
31 } 35 }
32 } 36 }
33 37
34 ::apache::mod { 'ssl': } 38 ::apache::mod { 'ssl':
39 package => $package_name,
40 }
35 41
36 if $apache_version >= 2.4 { 42 if versioncmp($apache_version, '2.4') >= 0 {
37 ::apache::mod { 'socache_shmcb': } 43 ::apache::mod { 'socache_shmcb': }
38 } 44 }
39 45
40 # Template uses 46 # Template uses
41 # 47 #
49 ensure => file, 55 ensure => file,
50 path => "${::apache::mod_dir}/ssl.conf", 56 path => "${::apache::mod_dir}/ssl.conf",
51 content => template('apache/mod/ssl.conf.erb'), 57 content => template('apache/mod/ssl.conf.erb'),
52 require => Exec["mkdir ${::apache::mod_dir}"], 58 require => Exec["mkdir ${::apache::mod_dir}"],
53 before => File[$::apache::mod_dir], 59 before => File[$::apache::mod_dir],
54 notify => Service['httpd'], 60 notify => Class['apache::service'],
55 } 61 }
56 } 62 }