Merge "Fixes nagios overwrite of apache configuration"
This commit is contained in:
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -39,7 +39,7 @@
|
|||||||
url = https://github.com/packstack/puppetlabs-xinetd.git
|
url = https://github.com/packstack/puppetlabs-xinetd.git
|
||||||
[submodule "packstack/puppet/modules/apache"]
|
[submodule "packstack/puppet/modules/apache"]
|
||||||
path = 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"]
|
[submodule "packstack/puppet/modules/firewall"]
|
||||||
path = packstack/puppet/modules/firewall
|
path = packstack/puppet/modules/firewall
|
||||||
url = https://github.com/puppetlabs/puppetlabs-firewall.git
|
url = https://github.com/puppetlabs/puppetlabs-firewall.git
|
||||||
|
|||||||
Submodule packstack/puppet/modules/apache updated: a2d8e839c4...a9017af019
@@ -1,4 +1,7 @@
|
|||||||
$horizon_packages = ["python-memcached", "python-netaddr"]
|
$horizon_packages = ["python-memcached", "python-netaddr"]
|
||||||
|
|
||||||
|
include concat::setup
|
||||||
|
|
||||||
package {$horizon_packages:
|
package {$horizon_packages:
|
||||||
notify => Class["horizon"],
|
notify => Class["horizon"],
|
||||||
ensure => present,
|
ensure => present,
|
||||||
@@ -20,14 +23,10 @@ class {'horizon':
|
|||||||
}
|
}
|
||||||
|
|
||||||
class {'memcached':}
|
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',
|
proto => 'tcp',
|
||||||
dport => [%(CONFIG_HORIZON_PORT)s],
|
dport => [%(CONFIG_HORIZON_PORT)s],
|
||||||
action => 'accept',
|
action => 'accept',
|
||||||
|
|||||||
@@ -29,37 +29,45 @@ file_line{'nohttp_ip':
|
|||||||
require => Class['horizon']
|
require => Class['horizon']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# if the mod_ssl apache puppet module does not install
|
# if the mod_ssl apache puppet module does not install
|
||||||
# this file, we ensure it haves the minimum
|
# this file, we ensure it haves the minimum
|
||||||
# requirements for SSL to work
|
# requirements for SSL to work
|
||||||
file {'/etc/httpd/conf.d/ssl.conf':
|
$ssl_lines = {
|
||||||
path => '/etc/httpd/conf.d/ssl.conf',
|
'ssl_port' => {
|
||||||
ensure => file,
|
path => '/etc/httpd/conf.d/ssl.conf',
|
||||||
mode => '0644'
|
match => 'Listen .+',
|
||||||
} -> file_line{'ssl_port':
|
line => 'Listen 443',
|
||||||
path => '/etc/httpd/conf.d/ssl.conf',
|
require => Class['apache::mod::ssl']
|
||||||
match => 'Listen .+',
|
},
|
||||||
line => 'Listen 443',
|
'start_vhost_ssl' => {
|
||||||
require => Class['apache::mod::ssl']
|
path => '/etc/httpd/conf.d/ssl.conf',
|
||||||
} -> file_line{'ssl_engine':
|
line => '<VirtualHost *:443>',
|
||||||
path => '/etc/httpd/conf.d/ssl.conf',
|
require => File_line['ssl_port'],
|
||||||
match => 'SSLEngine .+',
|
},
|
||||||
line => 'SSLEngine on',
|
'ssl_engine' => {
|
||||||
require => Class['apache::mod::ssl']
|
path => '/etc/httpd/conf.d/ssl.conf',
|
||||||
|
match => 'SSLEngine .+',
|
||||||
|
line => 'SSLEngine on',
|
||||||
|
require => File_line['start_vhost_ssl'],
|
||||||
|
},
|
||||||
|
# set the name of the ssl cert and key file
|
||||||
|
'sslcert' => {
|
||||||
|
path => '/etc/httpd/conf.d/ssl.conf',
|
||||||
|
match => '^SSLCertificateFile ',
|
||||||
|
line => 'SSLCertificateFile /etc/pki/tls/certs/ssl_ps_server.crt',
|
||||||
|
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 => File_line['sslcert'],
|
||||||
|
},
|
||||||
|
'end_vhost_ssl' => {
|
||||||
|
path => '/etc/httpd/conf.d/ssl.conf',
|
||||||
|
line => '</VirtualHost>',
|
||||||
|
require => File_line['sslkey'],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
# set the name of the ssl cert and key file
|
create_resources(file_line, $ssl_lines)
|
||||||
file_line{'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':
|
|
||||||
path => '/etc/httpd/conf.d/ssl.conf',
|
|
||||||
match => '^SSLCertificateKeyFile ',
|
|
||||||
line => 'SSLCertificateKeyFile /etc/pki/tls/private/ssl_ps_server.key',
|
|
||||||
require => Class['apache::mod::ssl']
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -55,14 +55,12 @@ class{'nagios_configs':
|
|||||||
notify => [Service['nagios'], Service['httpd']],
|
notify => [Service['nagios'], Service['httpd']],
|
||||||
}
|
}
|
||||||
|
|
||||||
class {'apache': }
|
include concat::setup
|
||||||
|
|
||||||
|
class {'apache':
|
||||||
|
purge_configs => false,
|
||||||
|
}
|
||||||
class {'apache::mod::php': }
|
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']:
|
service{['nagios']:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
|
|||||||
Reference in New Issue
Block a user