aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2020-07-23 17:08:46 +0200
committerJake Hunsaker <jhunsake@redhat.com>2020-07-23 16:08:13 -0400
commitb005fdc5980057bfe7a65a1ec5893673c87e9258 (patch)
tree163a3a23c01fba2dc2802343442a9ae42113f48e
parent482029d991e1aa075aafb122cbeee911afad341c (diff)
downloadsos-b005fdc5980057bfe7a65a1ec5893673c87e9258.tar.gz
[haproxy] enable the plugin when puppet-generated subdir exists
The plugin should be enabled also in containers where haproxy package is missing but thevar_puppet_gen directory exists. Resolves: #2163 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/haproxy.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sos/report/plugins/haproxy.py b/sos/report/plugins/haproxy.py
index 0d02e991..a4c57967 100644
--- a/sos/report/plugins/haproxy.py
+++ b/sos/report/plugins/haproxy.py
@@ -25,12 +25,13 @@ class HAProxy(Plugin, RedHatPlugin, DebianPlugin):
profiles = ('webserver',)
packages = ('haproxy',)
+ var_puppet_gen = '/var/lib/config-data/puppet-generated/haproxy'
+ files = (var_puppet_gen, )
def setup(self):
- var_puppet_gen = "/var/lib/config-data/puppet-generated/haproxy"
self.add_copy_spec([
"/etc/haproxy/haproxy.cfg",
- var_puppet_gen + "/etc/haproxy/haproxy.cfg"
+ self.var_puppet_gen + "/etc/haproxy/haproxy.cfg"
])
self.add_copy_spec("/etc/haproxy/conf.d/*")
self.add_cmd_output("haproxy -f /etc/haproxy/haproxy.cfg -c")