Merge "Fixes nagios overwrite of apache configuration"

This commit is contained in:
Jenkins
2014-02-03 22:25:24 +00:00
committed by Gerrit Code Review
5 changed files with 50 additions and 45 deletions

2
.gitmodules vendored
View File

@@ -39,7 +39,7 @@
url = https://github.com/packstack/puppetlabs-xinetd.git
[submodule "packstack/puppet/modules/apache"]
path = packstack/puppet/modules/apache
url = https://github.com/packstack/puppetlabs-apache.git
url = https://github.com/puppetlabs/puppetlabs-apache.git
[submodule "packstack/puppet/modules/firewall"]
path = packstack/puppet/modules/firewall
url = https://github.com/puppetlabs/puppetlabs-firewall.git

View File

@@ -1,4 +1,7 @@
$horizon_packages = ["python-memcached", "python-netaddr"]
include concat::setup
package {$horizon_packages:
notify => Class["horizon"],
ensure => present,
@@ -20,14 +23,10 @@ class {'horizon':
}
class {'memcached':}
if '%(CONFIG_NAGIOS_INSTALL)s' == 'y' {
class {'apache::mod::php': }
# The apache module purges files it doesn't know about
# avoid this be referencing them here
file { '/etc/httpd/conf.d/nagios.conf':}
}
firewall { '001 horizon incoming':
$firewall_port = %(CONFIG_HORIZON_PORT)s
firewall { '001 horizon ${firewall_port} incoming':
proto => 'tcp',
dport => [%(CONFIG_HORIZON_PORT)s],
action => 'accept',

View File

@@ -29,37 +29,45 @@ file_line{'nohttp_ip':
require => Class['horizon']
}
# if the mod_ssl apache puppet module does not install
# this file, we ensure it haves the minimum
# requirements for SSL to work
file {'/etc/httpd/conf.d/ssl.conf':
path => '/etc/httpd/conf.d/ssl.conf',
ensure => file,
mode => '0644'
} -> file_line{'ssl_port':
$ssl_lines = {
'ssl_port' => {
path => '/etc/httpd/conf.d/ssl.conf',
match => 'Listen .+',
line => 'Listen 443',
require => Class['apache::mod::ssl']
} -> file_line{'ssl_engine':
},
'start_vhost_ssl' => {
path => '/etc/httpd/conf.d/ssl.conf',
line => '<VirtualHost *:443>',
require => File_line['ssl_port'],
},
'ssl_engine' => {
path => '/etc/httpd/conf.d/ssl.conf',
match => 'SSLEngine .+',
line => 'SSLEngine on',
require => Class['apache::mod::ssl']
}
require => File_line['start_vhost_ssl'],
},
# set the name of the ssl cert and key file
file_line{'sslcert':
'sslcert' => {
path => '/etc/httpd/conf.d/ssl.conf',
match => '^SSLCertificateFile ',
line => 'SSLCertificateFile /etc/pki/tls/certs/ssl_ps_server.crt',
require => Class['apache::mod::ssl']
}
file_line{'sslkey':
require => File_line['ssl_engine'],
},
'sslkey' => {
path => '/etc/httpd/conf.d/ssl.conf',
match => '^SSLCertificateKeyFile ',
line => 'SSLCertificateKeyFile /etc/pki/tls/private/ssl_ps_server.key',
require => Class['apache::mod::ssl']
require => File_line['sslcert'],
},
'end_vhost_ssl' => {
path => '/etc/httpd/conf.d/ssl.conf',
line => '</VirtualHost>',
require => File_line['sslkey'],
},
}
create_resources(file_line, $ssl_lines)

View File

@@ -55,14 +55,12 @@ class{'nagios_configs':
notify => [Service['nagios'], Service['httpd']],
}
class {'apache': }
include concat::setup
class {'apache':
purge_configs => false,
}
class {'apache::mod::php': }
class {'apache::mod::wsgi':}
# The apache module purges files it doesn't know about
# avoid this be referencing them here
file { '/etc/httpd/conf.d/openstack-dashboard.conf':}
file { '/etc/httpd/conf.d/rootredirect.conf':}
file { '/etc/httpd/conf.d/nagios.conf':}
service{['nagios']:
ensure => running,