Only enabling rsyslog service if not chroot
Builds running in a chroot are failing when notifying to rsyslog. Assuming that an env var called FACTER_in_chroot is sent on this case (as done by disk-image-builder elements), ignore the declaration and interaction with rsyslog. Change-Id: Id4c7a3e0c3503904540c59d940b52481d263d5b9
This commit is contained in:
parent
b0b2f2d088
commit
71b4eb0062
@ -58,6 +58,20 @@ class openstack_project::template (
|
|||||||
ensure => present,
|
ensure => present,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($::in_chroot) {
|
||||||
|
notify { 'rsyslog in chroot':
|
||||||
|
message => 'rsyslog not refreshed, running in chroot',
|
||||||
|
}
|
||||||
|
$rsyslog_notify = []
|
||||||
|
} else {
|
||||||
|
service { 'rsyslog':
|
||||||
|
ensure => running,
|
||||||
|
enable => true,
|
||||||
|
hasrestart => true,
|
||||||
|
}
|
||||||
|
$rsyslog_notify = [ Service['rsyslog'] ]
|
||||||
|
}
|
||||||
|
|
||||||
# Custom rsyslog config to disable /dev/xconsole noise on Debuntu servers
|
# Custom rsyslog config to disable /dev/xconsole noise on Debuntu servers
|
||||||
file { '/etc/rsyslog.d/50-default.conf':
|
file { '/etc/rsyslog.d/50-default.conf':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
@ -67,7 +81,7 @@ class openstack_project::template (
|
|||||||
source =>
|
source =>
|
||||||
'puppet:///modules/openstack_project/rsyslog.d_50-default.conf',
|
'puppet:///modules/openstack_project/rsyslog.d_50-default.conf',
|
||||||
replace => true,
|
replace => true,
|
||||||
notify => Service['rsyslog'],
|
notify => $rsyslog_notify,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ubuntu installs their whoopsie package by default, but it eats through
|
# Ubuntu installs their whoopsie package by default, but it eats through
|
||||||
@ -86,13 +100,7 @@ class openstack_project::template (
|
|||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
notify => Service['rsyslog'],
|
notify => $rsyslog_notify,
|
||||||
}
|
|
||||||
|
|
||||||
service { 'rsyslog':
|
|
||||||
ensure => running,
|
|
||||||
enable => true,
|
|
||||||
hasrestart => true,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($::osfamily == 'RedHat') {
|
if ($::osfamily == 'RedHat') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user