forked from evolix/ansible-roles
logstash: logging to syslog is configurable (default: True)
This commit is contained in:
parent
ef1472cbba
commit
8233264d2a
|
@ -19,6 +19,7 @@ The **patch** part changes incrementally at each release.
|
|||
* generate-ldif: detect hardware raid card
|
||||
* generate-ldif: detect mdadm
|
||||
* listupgrade: crontab is configurable
|
||||
* logstash: logging to syslog is configurable (default: True)
|
||||
* mongodb: create munin plugins directory if missing
|
||||
* mysql: script "mysql_connections" to display a compact list of connections
|
||||
* mysql: script "mysql-queries-killer.sh" to kill MySQL queries
|
||||
|
|
|
@ -6,3 +6,5 @@ logstash_jvm_xmx: 512g
|
|||
logstash_log_rotate_days: 365
|
||||
logstash_custom_tmpdir: Null
|
||||
logstash_default_tmpdir: /var/lib/logstash/tmp
|
||||
logstash_log_syslog_enabled: True
|
||||
logstash_config_force: True
|
10
logstash/handlers/main.yml
Normal file
10
logstash/handlers/main.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
|
||||
- name: restart logstash
|
||||
systemd:
|
||||
name: logstash
|
||||
state: restarted
|
||||
daemon_reload: yes
|
||||
|
||||
- name: reload systemd
|
||||
command: systemctl daemon-reload
|
|
@ -16,3 +16,26 @@
|
|||
group: root
|
||||
mode: "0750"
|
||||
when: is_cron_installed.rc == 0
|
||||
|
||||
- name: "Create a system config directory for systemd overrides"
|
||||
file:
|
||||
path: /etc/systemd/system/logstash.service.d
|
||||
state: directory
|
||||
|
||||
- name: "disable syslog"
|
||||
ini_file:
|
||||
path: /etc/systemd/system/logstash.service.d/override.conf
|
||||
section: Service
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
create: yes
|
||||
no_extra_spaces: yes
|
||||
state: "{{ logstash_log_syslog_enabled | bool | ternary('absent','present') }}"
|
||||
loop:
|
||||
- { option: "StandardOutput", value: "null" }
|
||||
- { option: "StandardError", value: "null" }
|
||||
notify:
|
||||
- restart logstash
|
|
@ -88,7 +88,7 @@
|
|||
owner: logstash
|
||||
group: logstash
|
||||
mode: "0640"
|
||||
force: yes
|
||||
force: "{{ logstash_config_force | bool }}"
|
||||
loop: "{{ query('first_found', templates) }}"
|
||||
vars:
|
||||
templates:
|
||||
|
|
Loading…
Reference in a new issue