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,
|
||||
}
|
||||
|
||||
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
|
||||
file { '/etc/rsyslog.d/50-default.conf':
|
||||
ensure => present,
|
||||
@ -67,7 +81,7 @@ class openstack_project::template (
|
||||
source =>
|
||||
'puppet:///modules/openstack_project/rsyslog.d_50-default.conf',
|
||||
replace => true,
|
||||
notify => Service['rsyslog'],
|
||||
notify => $rsyslog_notify,
|
||||
}
|
||||
|
||||
# Ubuntu installs their whoopsie package by default, but it eats through
|
||||
@ -86,13 +100,7 @@ class openstack_project::template (
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
notify => Service['rsyslog'],
|
||||
}
|
||||
|
||||
service { 'rsyslog':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasrestart => true,
|
||||
notify => $rsyslog_notify,
|
||||
}
|
||||
|
||||
if ($::osfamily == 'RedHat') {
|
||||
|
Loading…
Reference in New Issue
Block a user