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
279b1869
Commit
279b1869
authored
Dec 02, 2015
by
Ross McDonald
Browse files
Merge pull request #4 from rossmcdonald/updates
Cluster Control Update
parents
3eeb8ce9
35b8dab7
Changes
5
Hide whitespace changes
Inline
Side-by-side
defaults/main.yml
View file @
279b1869
...
...
@@ -2,6 +2,8 @@
# Channel of InfluxDB to install (stable, unstable, nightly)
influxdb_install_version
:
stable
influxdb_start_service
:
yes
# If multiple servers are specified, whether to create a clustered configuration
# NOTE:
# - Do not attempt to cluster previously-unclustered servers. This can lead to data loss.
...
...
tasks/configure.yml
View file @
279b1869
...
...
@@ -32,4 +32,5 @@
enabled
:
yes
notify
:
-
pause
when
:
influxdb_start_service == True
templates/etc/default/influxdb.j2
View file @
279b1869
INFLUXD_OPTS="-hostname {{ ansible_hostname }}{% if influxdb_cluster_servers %} -join {% for host in groups['
all
']|sort %}{% if hostvars[host]['ansible_hostname'] != ansible_hostname %}{{ hostvars[host]['ansible_hostname'] }}:{{ influxdb_meta_port }}{% if not loop.last %},{% endif %}{% endif %}{% endfor %}{% endif %}"
INFLUXD_OPTS="-hostname {{ ansible_hostname }}{% if influxdb_cluster_servers %} -join {% for host in groups['
influxdb
']|sort %}{% if hostvars[host]['ansible_hostname'] != ansible_hostname %}{{ hostvars[host]['ansible_hostname'] }}:{{ influxdb_meta_port }}{% if not loop.last %},{% endif %}{% endif %}{% endfor %}{% endif %}"
templates/influxdb.conf.j2
View file @
279b1869
...
...
@@ -17,7 +17,11 @@ reporting-disabled = {{ influxdb_disable_reporting }}
[meta]
dir = "{{ influxdb_meta_dir }}"
{% if influxdb_cluster_servers %}
hostname = "{{ ansible_hostname }}"
{% else %}
hostname = "localhost"
{% endif %}
bind-address = ":{{ influxdb_meta_port }}"
retention-autocreate = {{ influxdb_meta_retention_autocreate }}
election-timeout = "{{ influxdb_meta_election_timeout }}"
...
...
test.yml
View file @
279b1869
...
...
@@ -3,6 +3,11 @@
-
defaults/main.yml
-
vars/main.yml
tasks
:
-
name
:
Add all hosts to influxdb group
add_host
:
name
:
"
{{
ansible_hostname
}}"
groups
:
influxdb
-
include
:
tasks/main.yml
handlers
:
-
include
:
handlers/main.yml
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