Make statsd optional for nodepool

It is possible a user doesn't want to install statsd, if so don't setup
systemd to use it.

Change-Id: I99c2995069ee70dfa1c24c5a4fb5e93c128e6313
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-12-03 20:00:47 -05:00
parent 63ba58b60b
commit 5cf20687c4
2 changed files with 2 additions and 2 deletions

View File

@ -3,6 +3,6 @@
#
[Service]
Environment=PATH={{ nodepool_pip_virtualenv }}/bin:{{ ansible_env.PATH }}
{% if ansible_host | ipv4 %}
{% if groups['statsd'] | list and ansible_host | ipv4 %}
Environment="STATSD_HOST={{ hostvars['statsd01'].ansible_host }}"
{% endif %}

View File

@ -2,6 +2,6 @@
# 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 %}