Ansible/playbook/linux/elastic/t.yml

16 lines
442 B
YAML
Raw Normal View History

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