Files
sf_databuffer/operation-tools/install_elastic.yml

58 lines
1.7 KiB
YAML

- hosts: imagebuffer
become: true
tasks:
- name: Install https certificate
template:
src: templates/elastic-stack-ca.pem
dest: /etc/pki/tls/certs/elastic-stack-ca.pem
- name: Install journalbeat
yum:
name: https://artifacts.elastic.co/downloads/beats/journalbeat/journalbeat-7.3.2-x86_64.rpm
state: present
- name: Install journalbeat configuration
template:
src: templates/journalbeat.yml
dest: /etc/journalbeat/journalbeat.yml
# - name: Install auditbeat
# yum:
# name: https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-7.3.2-x86_64.rpm
# state: present
# - name: Install auditbeat configuration
# template:
# src: templates/auditbeat.yml
# dest: /etc/auditbeat/auditbeat.yml
#
# - name: Install metricbeat
# yum:
# name: https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.3.2-x86_64.rpm
# state: present
# - name: Install metricbeat configuration
# template:
# src: templates/metricbeat.yml
# dest: /etc/metricbeat/metricbeat.yml
# - name: Install metricbeat system.yml configuration
# template:
# src: templates/system.yml
# dest: /etc/metricbeat/modules.d/system.yml
- name: Reload systemd unit files
systemd:
daemon_reload: yes
- name: Enable and start journalbeat
systemd:
enabled: yes
state: restarted
name: journalbeat
# - name: Enable and start metricbeat
# systemd:
# enabled: yes
# state: restarted
# name: metricbeat
# - name: Enable and start auditbeat
# systemd:
# enabled: yes
# state: restarted
# name: auditbeat