From 507f36a98c79c09461cb22bb3da4ceee573d5fd0 Mon Sep 17 00:00:00 2001 From: Glauco Oliveira Date: Fri, 11 Sep 2015 11:00:19 -0300 Subject: [PATCH] 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 Co-Authored-By: Danilo Ramalho --- manifests/lb.pp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/manifests/lb.pp b/manifests/lb.pp index fdcab6b..87d92e5 100644 --- a/manifests/lb.pp +++ b/manifests/lb.pp @@ -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',