
mod_enable_dir is not necessarily defined under all the operating systems. For example, for Redhat it has undef value. It is causing puppet manifest to fail, so just execute that fix when that directory has some value. Change-Id: Iab56636151ac4d7da24a5a5ce18356b81adad832
45 lines
1.0 KiB
Puppet
45 lines
1.0 KiB
Puppet
# Class: OpenStack Infra Logs
|
|
#
|
|
class infracloud::logs(
|
|
$docroot = '/var/www/logs',
|
|
$port = '80',
|
|
$vhost_name = $::fqdn,
|
|
) {
|
|
include ::apache
|
|
|
|
file { $docroot:
|
|
ensure => directory,
|
|
require => Class['::apache'],
|
|
}
|
|
|
|
# Allow everybody to read neutron logs.
|
|
file { '/var/log/neutron':
|
|
ensure => directory,
|
|
group => adm,
|
|
mode => '0644',
|
|
owner => neutron,
|
|
require => Class['::neutron'],
|
|
}
|
|
|
|
file { "${docroot}/neutron":
|
|
ensure => link,
|
|
target => '/var/log/neutron',
|
|
group => root,
|
|
owner => root,
|
|
require => [
|
|
File[$docroot],
|
|
File['/var/log/neutron'],
|
|
],
|
|
}
|
|
|
|
::apache::vhost::custom { $vhost_name:
|
|
ensure => present,
|
|
content => template('infracloud/logs.vhost.erb'),
|
|
}
|
|
|
|
# Temporary workaround until https://github.com/puppetlabs/puppetlabs-apache/pull/1388 is merged and released
|
|
if $::apache::mod_enable_dir != undef {
|
|
File[$::apache::mod_enable_dir] -> Exec["syntax verification for ${vhost_name}"]
|
|
}
|
|
}
|