Skip to content
Permalink
Browse files

add triggers to restart cassandra_exporter (#44)

* when new config file is copied
* when port is changed
  • Loading branch information...
marianschmotzer authored and erebe committed Feb 12, 2019
1 parent 449dfd2 commit 37f1e0f6f39c1e77ca962dedb7f89a1dcd191ede
Showing with 8 additions and 0 deletions.
  1. +8 −0 ansible/roles/ansible-cassandra-exporter/tasks/main.yml
@@ -35,25 +35,33 @@
get_url:
url: '{{ cassandra_exporter_config_url }}'
dest: '{{ cassandra_exporter_config_dir }}/config.yml'
notify:
- restart cassandra exporter
when: cassandra_exporter_config is not defined

- name: 'Copy cassandra exporter config'
copy:
src: '{{ cassandra_exporter_config }}'
dest: '{{ cassandra_exporter_config_dir }}/config.yml'
notify:
- restart cassandra exporter
when: cassandra_exporter_config is defined

- name: 'set cassandra listen address'
lineinfile:
regexp: "^listenAddress"
dest: "{{ cassandra_exporter_config_dir }}/config.yml"
line: "listenAddress: {{ cassandra_listen_address }}"
notify:
- restart cassandra exporter

- name: 'set cassandra listen port'
lineinfile:
regexp: "^listenPort"
dest: "{{ cassandra_exporter_config_dir }}/config.yml"
line: "listenPort: {{ cassandra_listen_port }}"
notify:
- restart cassandra exporter

- name: 'generate the shell script'
template:

0 comments on commit 37f1e0f

Please sign in to comment.
You can’t perform that action at this time.