James Tombleson
3f49a5fe88
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.
16 lines
442 B
YAML
16 lines
442 B
YAML
---
|
|
- name: update metricbeat
|
|
hosts: linux
|
|
|
|
tasks:
|
|
|
|
- name: define elasticsearch hosts
|
|
become: true
|
|
lineinfile:
|
|
path: /etc/metricbeat/metricbeat.yml
|
|
regexp: 'hosts: \["localhost:9200"\]'
|
|
#insertafter: 'hosts: \["localhost:9200"\]'
|
|
line: ' hosts: ["dm-nagios.local:9200"]'
|
|
state: present
|
|
backrefs: yes
|