An Ansible role to deploy Elastic Beats modules shipper.
Only one shipper can be installed at a time using this role. If you want to install several shippers, run the role multiple times
Supported targets:
- Debian 8 "Jessie"
- Debian 9 "Stretch"
- Debian 10 "Buster"
- RedHat EL 7
- Ubuntu 16.04 "Xenial"
- Ubuntu 20.04 "Bionic"
beats__shipper
- Beats software shipper to install. Supported: filebeat, metricbeat, heartbeatbeats__modules
- List of modules templates configuration files to addbeats__modules_sourcedir
- Modules templates directory. Default:templates/
beats__autostart
- Should autostart the daemon at installation step. Default:yes
beats__extra_options
- options to add at the end of configuration filebeats__logstash_enabled
- Is Logstash output enabled. Default:false
beats__logstash_index
- The index root name to write evetns to. Default:undefined. which default to builtin value
beats__logstash_hosts
- The list of downstream Logstash servers. Default:["localhost:5044"]
beats__elasticsearch_enabled
- Is ElasticSearch output enabled. Default:false
beats__elasticsearch_hosts
- The list of downstream ElasticSearch servers. Default:["localhost:9200"]
beats__elasticsearch_protocol
- ElasticSearch connection protocl. Default: "http"beats__elasticsearch_user
- If auth enabled, provide usernamebeats__elasticsearch_password
- If auth enabled, provide password
Ansible roles, can be pulled by ansible-galaxy or by hand in roles/
enix.elastic_repo
: https://galaxy.ansible.com/enix/elastic_repo/.
Clone this repo into your roles directory:
$ git clone https://gitlab.enix.org/ansible/ansible-beats.git roles/beats
Or use Ansible galaxy requirements.yml
# enix.beats galaxy role
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- role: enix.beats
elastic_repo__branch: 6.x
beats__shipper: "filebeat"
beats__elasticsearch_enabled: true
beats__elasticsearch_hosts: ["192.168.1.1:9200", "192.168.1.2:9200"]
beats__modules: ['system.yml.j2']
beats__modules_sourcedir: "modules/"
beats__extra_options: |
xpack.monitoring.enabled: true
logging.level: debug
Or can be configured in inventory files this way using oneliner:
[all:vars]
beats__logstash_hosts=["toto:5004"]
beats__modules=["system.yml.j2"]
List of stuff to improve in this role
- readd tls stuff when needed
GPLv2
Laurent CORBES, Based on Artur Melo work at https://github.com/Restless-ET/ansible-role-beats