ansible-role-logstash/molecule/default/converge.yml

31 lines
780 B
YAML
Raw Normal View History

2021-08-24 14:58:34 +00:00
---
- name: Converge
hosts: all
roles:
- ansible-role-logstash
vars:
logstash_plugins:
- name: logstash-output-influxdb
logstash_patterns:
postfix: |
# Syslog stuff
PROCESS ([\w._\/%-]+)
COMPID postfix\/%{PROCESS:process}(?:\[%{NUMBER:pid}\])?
POSTFIX (?:%{SYSLOGTIMESTAMP:timestamp}|%{TIMESTAMP_ISO8601:timestamp8601}) (?:%{SYSLOGFACILITY} )?%{SYSLOGHOST:logsource} %{COMPID}:
logstash_inputs:
- >
file {
path => "/var/log/syslog"
}
logstash_outputs:
- >
file {
path => "/tmp/logstash.log"
codec => "json"
}
pre_tasks:
- name: update apt cache
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600