Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sol1 Ansible Roles
sol1-influxdb
Commits
7412bb5e
Commit
7412bb5e
authored
Jan 27, 2016
by
Ross McDonald
Browse files
Modified hosts and configuration for clustered environments to rely on hostnames instead of IPs.
parent
788790a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
templates/etc/hosts.j2
View file @
7412bb5e
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'] %}
{% if host != "localhost" and hostvars[host]['ansible_hostname'] != ansible_hostname %}
{{ hostvars[host]['ansible_all_ipv4_addresses'] | last }} {{ hostvars[host]['ansible_hostname'] }}
...
...
templates/influxdb.conf.j2
View file @
7412bb5e
...
...
@@ -8,11 +8,6 @@
# Change this option to true to 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]
###
...
...
@@ -23,8 +18,8 @@ reporting-disabled = {{ influxdb_disable_reporting }}
[meta]
enabled = {{ influxdb_meta_enabled }}
dir = "{{ influxdb_meta_dir }}"
bind-address = "{{ ansible_
all_ipv4_addresses|last
}}:{{ influxdb_meta_port }}"
http-bind-address = "{{ ansible_
all_ipv4_addresses|last
}}:{{ influxdb_meta_http_port }}"
bind-address = "{{ ansible_
hostname
}}:{{ influxdb_meta_port }}"
http-bind-address = "{{ ansible_
hostname
}}:{{ influxdb_meta_http_port }}"
retention-autocreate = {{ influxdb_meta_retention_autocreate }}
election-timeout = "{{ influxdb_meta_election_timeout }}"
heartbeat-timeout = "{{ influxdb_meta_heartbeat_timeout }}"
...
...
@@ -123,7 +118,7 @@ reporting-disabled = {{ influxdb_disable_reporting }}
[admin]
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-certificate = "{{ influxdb_admin_https_certificate }}"
...
...
@@ -144,7 +139,7 @@ reporting-disabled = {{ influxdb_disable_reporting }}
[http]
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 }}
log-enabled = {{ influxdb_http_log_enabled }}
write-tracing = {{ influxdb_http_write_tracing }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment