More places for statsd to be optional

Again, if statsd group doesn't have any hosts, don't enable it for our
services.

Change-Id: Ideea60580b37365c006d344ef8d8d2286181f0bf
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-12-07 19:59:04 -05:00
parent 74fae84e26
commit 5037a1a47a
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ log_config = /etc/zuul/scheduler-logging.conf
pidfile = /var/run/zuul-scheduler/zuul-scheduler.pid
state_dir = {{ zuul_user_home }}
{% if ansible_host | ipv4 %}
{% if groups['statsd'] | list and ansible_host | ipv4 %}
[statsd]
server = {{ hostvars['statsd01'].ansible_host }}
{% endif %}

View File

@ -2,7 +2,7 @@
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#
[Service]
{% if ansible_host | ipv4 %}
{% if groups['statsd'] | list and ansible_host | ipv4 %}
Environment="STATSD_HOST={{ hostvars['statsd01'].ansible_host }}"
{% endif %}
Environment="ARGS=--ssl-ca {{ gear_file_ssl_ca_dest }} --ssl-cert {{ gear_file_ssl_cert_dest }} --ssl-key {{ gear_file_ssl_key_dest }} --log-config /etc/gear/logging.conf"