Skip to content
Snippets Groups Projects
Commit 7412bb5e authored by Ross McDonald's avatar Ross McDonald
Browse files

Modified hosts and configuration for clustered environments to rely on hostnames instead of IPs.

parent 788790a7
Branches
Tags
No related merge requests found
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
{{ ansible_all_ipv4_addresses|last }} {{ ansible_hostname }} 0.0.0.0 {{ ansible_hostname }}
{% for host in groups['all'] %} {% for host in groups['all'] %}
{% if host != "localhost" and hostvars[host]['ansible_hostname'] != ansible_hostname %} {% if host != "localhost" and hostvars[host]['ansible_hostname'] != ansible_hostname %}
{{ hostvars[host]['ansible_all_ipv4_addresses'] | last }} {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_all_ipv4_addresses'] | last }} {{ hostvars[host]['ansible_hostname'] }}
......
...@@ -8,11 +8,6 @@ ...@@ -8,11 +8,6 @@
# Change this option to true to disable reporting. # Change this option to true to disable reporting.
reporting-disabled = {{ influxdb_disable_reporting }} reporting-disabled = {{ influxdb_disable_reporting }}
# Commenting these out, as they cause issues in the current iteration
#dir = ""
#hostname = "{{ ansible_all_ipv4_addresses|last }}"
#bind-address = ""
### ###
### [meta] ### [meta]
### ###
...@@ -23,8 +18,8 @@ reporting-disabled = {{ influxdb_disable_reporting }} ...@@ -23,8 +18,8 @@ reporting-disabled = {{ influxdb_disable_reporting }}
[meta] [meta]
enabled = {{ influxdb_meta_enabled }} enabled = {{ influxdb_meta_enabled }}
dir = "{{ influxdb_meta_dir }}" dir = "{{ influxdb_meta_dir }}"
bind-address = "{{ ansible_all_ipv4_addresses|last }}:{{ influxdb_meta_port }}" bind-address = "{{ ansible_hostname }}:{{ influxdb_meta_port }}"
http-bind-address = "{{ ansible_all_ipv4_addresses|last }}:{{ influxdb_meta_http_port }}" http-bind-address = "{{ ansible_hostname }}:{{ influxdb_meta_http_port }}"
retention-autocreate = {{ influxdb_meta_retention_autocreate }} retention-autocreate = {{ influxdb_meta_retention_autocreate }}
election-timeout = "{{ influxdb_meta_election_timeout }}" election-timeout = "{{ influxdb_meta_election_timeout }}"
heartbeat-timeout = "{{ influxdb_meta_heartbeat_timeout }}" heartbeat-timeout = "{{ influxdb_meta_heartbeat_timeout }}"
...@@ -123,7 +118,7 @@ reporting-disabled = {{ influxdb_disable_reporting }} ...@@ -123,7 +118,7 @@ reporting-disabled = {{ influxdb_disable_reporting }}
[admin] [admin]
enabled = {{ influxdb_admin_enabled }} enabled = {{ influxdb_admin_enabled }}
bind-address = "{{ ansible_all_ipv4_addresses|last }}:{{ influxdb_admin_port }}" bind-address = "{{ ansible_hostname }}:{{ influxdb_admin_port }}"
https-enabled = {{ influxdb_admin_https_enabled }} https-enabled = {{ influxdb_admin_https_enabled }}
https-certificate = "{{ influxdb_admin_https_certificate }}" https-certificate = "{{ influxdb_admin_https_certificate }}"
...@@ -144,7 +139,7 @@ reporting-disabled = {{ influxdb_disable_reporting }} ...@@ -144,7 +139,7 @@ reporting-disabled = {{ influxdb_disable_reporting }}
[http] [http]
enabled = {{ influxdb_http_enabled }} enabled = {{ influxdb_http_enabled }}
bind-address = "{{ ansible_all_ipv4_addresses|last }}:{{ influxdb_http_port }}" bind-address = "{{ ansible_hostname }}:{{ influxdb_http_port }}"
auth-enabled = {{ influxdb_http_auth_enabled }} auth-enabled = {{ influxdb_http_auth_enabled }}
log-enabled = {{ influxdb_http_log_enabled }} log-enabled = {{ influxdb_http_log_enabled }}
write-tracing = {{ influxdb_http_write_tracing }} write-tracing = {{ influxdb_http_write_tracing }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment