Kapisi/roles/Sharingan/tasks/data.yml

55 lines
1.1 KiB
YAML
Raw Normal View History

---
- name: Sharingan data packages
2020-10-18 23:49:25 -05:00
become: yes
package:
state: present
name:
2020-10-18 23:49:25 -05:00
- syslog-ng
2022-01-25 23:54:43 -06:00
- monit
- monitoring-plugins
2020-10-18 23:49:25 -05:00
- name: Sharingan-Data apps dir
become: yes
file:
path: /etc/syslog-ng/apps.d
state: directory
- name: Sharingan-Data include apps dir
become: yes
2022-01-25 23:54:43 -06:00
register: base_config
lineinfile:
2020-10-18 23:49:25 -05:00
path: /etc/syslog-ng/syslog-ng.conf
line: "{{ item }}"
loop:
2020-10-18 23:49:25 -05:00
- '# Allow compartmentalization of config'
- '@include "apps.d/*.conf"'
2020-10-18 23:49:25 -05:00
- name: Sharingan-Data conf
become: yes
template:
src: graylog.conf.j2
dest: /etc/syslog-ng/apps.d/graylog.conf
owner: root
group: root
mode: 0750
2022-01-25 23:54:43 -06:00
- name: Sharingan-Data service conf
become: yes
copy:
src: syslog-ng/syslog-ng@sharingan-data
2022-01-25 23:54:43 -06:00
dest: /etc/default/syslog-ng@sharingan-data
owner: root
group: root
mode: 0655
2020-10-18 23:49:25 -05:00
- name: Sharingan-Data filer service
become: yes
register: data_service
2020-10-18 23:49:25 -05:00
copy:
src: "syslog-ng/sharingan-data.service/{{ ansible_os_family }}"
2020-10-18 23:49:25 -05:00
dest: /usr/lib/systemd/system/sharingan-data.service
owner: root
group: root
mode: 0750