Ansible/playbook/linux/elastic/config-heartbeat.yml
James Tombleson 3f49a5fe88 -sigh-
After trying to go down the path of editing the configs with inline I am going to change over to a template file and see if I can get that to work better for me.  At least Elastic will now let me hit the REST.
2019-04-23 12:21:00 -07:00

35 lines
810 B
YAML

---
- 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"'
- 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
- 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