Remove hardcoded statsd01 host

Since the statsd client only support a single server, we have to use the
first server in the statsd group.

Change-Id: Iebc7a89e7ce7fcb8d30208dd55a7013007cadf93
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2019-03-18 14:51:42 -04:00
parent fb4ee9320e
commit 401d3f6bbd
3 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
#
[Service]
{% if groups['statsd'] | list and ansible_host | ipv4 %}
Environment="STATSD_HOST={{ hostvars['statsd01'].ansible_host }}"
Environment="STATSD_HOST={{ hostvars[groups['statsd'][0]].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"
Environment="PREFIX={{ gear_pip_virtualenv }}"

View File

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

View File

@ -3,5 +3,5 @@
#
[Service]
{% if groups['statsd'] | list and ansible_host | ipv4 %}
Environment="STATSD_HOST={{ hostvars['statsd01'].ansible_host }}"
Environment="STATSD_HOST={{ hostvars[groups['statsd'][0]].ansible_host }}"
{% endif %}