Commit 0762fcbe authored by Ross McDonald's avatar Ross McDonald
Browse files

Modified clustering configuration slightly so that service is fully stopped...

Modified clustering configuration slightly so that service is fully stopped when purging peer metadata.
parent 3dbfb651
---
- name: Update hosts configuration
template:
src: etc/hosts.j2
......@@ -21,6 +22,12 @@
mode: 0644
register: influxdb_cluster_set
- name: Stop InfluxDB
service:
name: influxdb
state: stopped
when: influxdb_cluster_set.changed or influxdb_purge_peer_data
- name: Purge existing peer data
file:
path: "{{ item }}"
......@@ -31,15 +38,15 @@
- "{{ influxdb_meta_dir }}/peers.json"
when: influxdb_cluster_set.changed or influxdb_purge_peer_data
- name: Restart InfluxDB
- name: Start InfluxDB
service:
name: influxdb
state: restarted
state: started
when: influxdb_cluster_set.changed or influxdb_purge_peer_data
- name: Pause for a moment
pause:
seconds: 5
seconds: 3
when: influxdb_cluster_set.changed or influxdb_purge_peer_data
- name: Collect cluster status
......@@ -57,6 +64,6 @@
assert:
that:
- "influxdb_show_servers_output.stdout.find(item)"
with_items: groups['influxdb']|default([], True)
with_items: groups['influxdb']|default([])
when: "'influxdb' in groups and is_vagrant == False"
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment