openstack-ansible-ops/elk_metrics/installTopbeat.yml
Ala Raddaoui b7a6ceb086 Added playbooks to install ELK stack with topbeat
This set of playbooks install an Elasticsearch cluster,
Logstash and a kibana dashboard inside containers
and then install Topbeat in your cloud to ship system metrics
to the Elastic cluster.

Change-Id: I0c8c853ee48bd9278bd7b08719be4bde5f8c3df6
2017-12-20 13:27:22 +00:00

25 lines
763 B
YAML

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