2019-04-22 15:01:56 -07:00
|
|
|
---
|
|
|
|
- name: define kibana host
|
|
|
|
become: true
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/heartbeat/heartbeat.yml
|
|
|
|
regex: '^host: "dm-nagios.local:5601"'
|
|
|
|
insertafter: '#host: "localhost:5601"'
|
|
|
|
line: 'host: "dm-nagios.local:5601"'
|
|
|
|
|
2019-04-23 12:21:00 -07:00
|
|
|
- name: define elasticsearch host
|
|
|
|
become: true
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/heartbeat/heartbeat.yml
|
|
|
|
regexp: 'hosts: \["localhost:9200"\]'
|
|
|
|
line: ' host: ["dm-nagios.local:9200"]'
|
|
|
|
state: present
|
|
|
|
backrefs: yes
|
|
|
|
|
2019-04-22 15:01:56 -07:00
|
|
|
- name: systemd - daemon reload
|
|
|
|
become: true
|
|
|
|
systemd:
|
|
|
|
daemon_reload: yes
|
|
|
|
|
|
|
|
- name: system - enable on startup
|
|
|
|
become: true
|
|
|
|
systemd:
|
|
|
|
name: heartbeat-elastic
|
|
|
|
enabled: yes
|
|
|
|
|
|
|
|
- name: systemd - restart heartbeat
|
|
|
|
become: true
|
|
|
|
systemd:
|
|
|
|
name: heartbeat-elastic
|
|
|
|
state: restarted
|