Fix loadbalancer manifest to be able to apply.

There were two outstanding errors preventing us from applying this
manifest:
- It was assuming you always have a non-loopback network interface
configured to use IPv6
- It was assuming the service rsyslog was already defined

Our patch fixed these two problems allowing you to apply the script.

Change-Id: Ie2c2d6ec9740a1d57b0b82e431ad2161c2940a80
Co-Authored-By: Bruno Tavares <btavare@thoughtworks.com>
Co-Authored-By: Danilo Ramalho <dramalho@thoughtworks.com>
This commit is contained in:
Glauco Oliveira 2015-09-11 11:00:19 -03:00 committed by Bruno Tavares
parent 3e5cc48a3a
commit 507f36a98c
1 changed files with 8 additions and 0 deletions

View File

@ -48,6 +48,7 @@ class cgit::lb (
'stats' => 'socket /var/lib/haproxy/stats user root group root mode 0600 level admin'
},
}
# The three listen defines here are what the world will hit.
$haproxy_addresses = delete_undef_values([$::ipaddress, $::ipaddress6])
@ -109,6 +110,13 @@ class cgit::lb (
options => 'maxqueue 512',
}
if (!defined(Service['rsyslog'])) {
service { 'rsyslog':
ensure => running,
enable => true,
}
}
file { '/etc/rsyslog.d/haproxy.conf':
ensure => present,
owner => 'root',