Ansible/playbook/linux/elastic/t.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

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