Kapisi/roles/Sharingan/tasks/siem.yml

34 lines
828 B
YAML
Raw Permalink Normal View History

---
- name: Sharingan packages
become: yes
register: sharingan_packages
package:
name:
- elasticsearch
2023-10-08 12:28:14 -05:00
- mongodb44-bin # Temporarily pinned for extensions
- graylog
state: present
- name: Sharingan services
become: yes
loop:
- elasticsearch
- mongodb
- graylog
service:
name: "{{ item }}"
state: started
enabled: yes
- name: Sharingan backups directory
become: yes
file:
path: /usr/local/backups/elasticsearch
state: directory
owner: elasticsearch
group: elasticsearch
mode: 0770
- name: Set Sharingan backups
command: "curl -X PUT localhost:9200/_snapshot/my_backup?pretty -H 'Content-Type: application/json' -d '{ type: fs, settings: { location: /usr/local/backup/elasticsearch, compress: true } }'"