summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-03-11 19:12:04 +0000
committerGerrit Code Review <review@openstack.org>2016-03-11 19:12:04 +0000
commit9cf9c2ed1dd1754ef30bda9f6f79cb9e384b5231 (patch)
tree14c4d9f3b16b33cdba203451cdd850e0e8325194
parentd63ca9a3b648908ce9f98fa1e08251bab7f88026 (diff)
parent86d9628a5a79aebd6b58d61b35f2439e2ce08700 (diff)
Merge "Fix races in httpd install and config"
-rw-r--r--manifests/apache.pp83
1 files changed, 59 insertions, 24 deletions
diff --git a/manifests/apache.pp b/manifests/apache.pp
index 2a4e887..faae63c 100644
--- a/manifests/apache.pp
+++ b/manifests/apache.pp
@@ -24,43 +24,78 @@ class etherpad_lite::apache (
24 template => 'etherpad_lite/etherpadlite.vhost.erb', 24 template => 'etherpad_lite/etherpadlite.vhost.erb',
25 ssl => true, 25 ssl => true,
26 } 26 }
27 httpd_mod { 'rewrite': 27
28 ensure => present, 28 if !defined(Mod['rewrite']) {
29 httpd::mod { 'rewrite':
30 ensure => present,
31 }
29 } 32 }
30 httpd_mod { 'proxy': 33 if !defined(Mod['proxy']) {
31 ensure => present, 34 httpd::mod { 'proxy':
35 ensure => present,
36 }
32 } 37 }
33 httpd_mod { 'proxy_http': 38 if !defined(Mod['proxy_http']) {
34 ensure => present, 39 httpd::mod { 'proxy_http':
40 ensure => present,
41 }
35 } 42 }
36 43
44 file { '/etc/apache2':
45 ensure => directory,
46 owner => 'root',
47 group => 'root',
48 mode => '0755',
49 }
37 if ($::lsbdistcodename == 'precise') { 50 if ($::lsbdistcodename == 'precise') {
51 file { '/etc/apache2/conf.d':
52 ensure => directory,
53 owner => 'root',
54 group => 'root',
55 mode => '0755',
56 require => File['/etc/apache2'],
57 }
38 file { '/etc/apache2/conf.d/connection-tuning': 58 file { '/etc/apache2/conf.d/connection-tuning':
39 ensure => present, 59 ensure => present,
40 owner => 'root', 60 owner => 'root',
41 group => 'root', 61 group => 'root',
42 mode => '0644', 62 mode => '0644',
43 source => 'puppet:///modules/etherpad_lite/apache-connection-tuning', 63 source => 'puppet:///modules/etherpad_lite/apache-connection-tuning',
44 notify => Service['httpd'], 64 notify => Service['httpd'],
65 require => File['/etc/apache2/conf.d'],
45 } 66 }
46 } else { 67 } else {
47 file { '/etc/apache2/conf-available/connection-tuning.conf': 68 file { '/etc/apache2/conf-available':
48 ensure => present, 69 ensure => directory,
49 owner => 'root', 70 owner => 'root',
50 group => 'root', 71 group => 'root',
51 mode => '0644', 72 mode => '0755',
52 source => 'puppet:///modules/etherpad_lite/apache-connection-tuning', 73 require => File['/etc/apache2'],
74 }
75 file { '/etc/apache2/conf-available/connection-tuning':
76 ensure => present,
77 owner => 'root',
78 group => 'root',
79 mode => '0644',
80 source => 'puppet:///modules/etherpad_lite/apache-connection-tuning',
81 require => File['/etc/apache2/conf-available'],
53 } 82 }
54 83
55 file { '/etc/apache2/conf-enabled/connection-tuning.conf': 84 file { '/etc/apache2/conf-enabled':
85 ensure => directory,
86 owner => 'root',
87 group => 'root',
88 mode => '0755',
89 require => File['/etc/apache2'],
90 }
91 file { '/etc/apache2/conf-enabled/connection-tuning':
56 ensure => link, 92 ensure => link,
57 target => '/etc/apache2/conf-available/connection-tuning.conf', 93 target => '/etc/apache2/conf-available/connection-tuning.conf',
58 notify => Service['httpd'], 94 notify => Service['httpd'],
59 require => File['/etc/apache2/conf-available/connection-tuning.conf'], 95 require => [
60 } 96 File['/etc/apache2/conf-enabled'],
61 97 File['/etc/apache2/conf-available/connection-tuning'],
62 httpd_mod { 'proxy_wstunnel': 98 ],
63 ensure => present,
64 } 99 }
65 } 100 }
66 101