From b4f0af6963e936ed2ca084d8c5a164c6ad459ac1 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Fri, 19 Apr 2019 16:15:04 -0700 Subject: [PATCH] Update install-metricbeat.yml --- playbook/linux/elastic/install-metricbeat.yml | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/playbook/linux/elastic/install-metricbeat.yml b/playbook/linux/elastic/install-metricbeat.yml index 22fdbb2..31c4050 100644 --- a/playbook/linux/elastic/install-metricbeat.yml +++ b/playbook/linux/elastic/install-metricbeat.yml @@ -13,7 +13,32 @@ apt: deb: /tmp/metricbeat.deb - - name: enable modules + # - name: enable modules + + - name: define kibana host: + become: true + lineinfile: + path: /etc/metricbeat/metricbeat.yml + regex: '^host: "localhost:5601"' + insertafter: '#host: "localhost:5601"' + line: 'host: ' - name: config where to send information + + - name: systemd - daemon reload + become: true + systemd: + daemon_reload: yes + + - name: Enable service on system startup + become: true + systemd: + name: metricbeat + enabed: yes + + - name: systemd - restart Metricbeat + become: true + systemd: + name: metricbeat + state: restarted