Ansible/roles/luther38.logstash/tasks/ubuntu.yml
James Tombleson d2d1e2734f Adding fileeat role
Unsure about logstash currently.  That one is on hold for now.
2019-05-01 15:21:32 -07:00

45 lines
801 B
YAML

- name: Add Elastic repo
include: install-repo.yml
- name: Install logstash from apt
become: true
apt:
name: logstash
- name: Update config
become: true
template:
src: logstash.j2
dest: /tmp/logstash/logstash.yml
backup: yes
- name: UFW allow http_port
become: true
when: ufw_http_port == true
ufw:
rule: allow
port: "{{ http_port }}"
- name: UFW allow transport_port
become: true
when: ufw_transport_port == true
ufw:
rule: allow
port: "{{ transport_port }}"
- name: systemd enable elasticsearch
become: true
when: systemd_enabled == true
systemd:
name: elasticsearch
enabled: true
- name: systemd restart elasticsearch
become: true
when: systemd_restart == true
systemd:
name: elasticsearch
state: restarted