This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Config Web VM metricbeat | |
hosts: webservers | |
become: true | |
tasks: | |
- name: Download and install metricbeat | |
apt: | |
deb: "https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.6.1-amd64.deb" | |
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Config Web VM filebeat | |
hosts: webservers | |
become: true | |
tasks: | |
- name: Download and install filebeat to the VM | |
apt: | |
deb: "https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.6.1-amd64.deb" | |
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Config ELK VM with Docker and the Elastic Stack | |
hosts: elk | |
become: true | |
tasks: | |
- name: docker.io | |
apt: | |
update_cache: yes | |
name: docker.io | |
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Throws a KeyError 'sourcetype' exception. | |
Wrap in a try/except block - catch KeyError and assign 'bamboo' and raise from the default except. |