influxdb.j2 821 Bytes
Newer Older
1
2
3
{% if is_vagrant and influxdb_cluster_servers %}
VAGRANT=true
{% if groups['all'][0] != ansible_hostname %}
4
INFLUXD_OPTS="-join {% for host in groups['all'] if hostvars[host]['ansible_hostname'] != ansible_hostname %}{% if loop.index0 <= 1 %}{{ hostvars[host]['ansible_all_ipv4_addresses']|last }}:{{ influxdb_meta_http_port }}{% if not loop.index > 1 %},{% endif %}{% endif %}{% endfor %}"
5
6
7
{% endif %}
{% else %}
VAGRANT=false
8
{% if hostvars[groups['influxdb'][0]]['ansible_hostname'] != ansible_hostname %}
Ross McDonald's avatar
Ross McDonald committed
9
INFLUXD_OPTS="-join {% for host in groups['influxdb'] if hostvars[host]['ansible_hostname'] != ansible_hostname %}{% if loop.index0 <= 1 %}{{ hostvars[host]['ansible_all_ipv4_addresses']|last }}:{{ influxdb_meta_http_port }}{% if not loop.index > 1 %},{% endif %}{% endif %}{% endfor %}"
10
11
{% endif %}
{% endif %}