openstack-ansible-ops/elk_metrics_6x/installMetricbeat.yml
Per Abildgaard Toft 48e2b8e998 Updatev version of ELK stack for openstack ansible
This addition is an updated of the curent elk_metrics which will install Elasticsearc, Logstash and Kibana 6.x.
It also include configuration guide for haproxy endpoints

Change-Id: Iac4dec6d17bc75433e5fe672f3b9781536b8e619
2018-03-06 14:21:23 +00:00

31 lines
978 B
YAML

---
- name: metricsbeat
hosts: hosts
become: true
vars_files:
- vars/variables.yml
tasks:
- name: add metricsbeat repo to apt sources list
apt_repository: repo='deb https://artifacts.elastic.co/packages/6.x/apt stable main' state=present
- name: add Elastic search public GPG key (same for Metricsbeat)
apt_key:
url: "https://artifacts.elastic.co/GPG-KEY-elasticsearch"
state: "present"
- name: enable apt-transport-https
apt: name=apt-transport-https state=present update_cache=yes
- name: Ensure Metricsbeat is installed.
apt: name=metricbeat state=present update_cache=yes
- name: Drop metricbeat conf file
template:
src: templates/metricbeat.yml.j2
dest: /etc/metricbeat/metricbeat.yml
tags:
- config
- name: Enable and restart metricbeat
service:
name: "metricbeat"
enabled: true
state: restarted
tags:
- config