Skip to content

Instantly share code, notes, and snippets.

@varnav
Last active November 14, 2016 12:27
Show Gist options
  • Save varnav/3ffcae710e843c40ffe9696cce3ad59c to your computer and use it in GitHub Desktop.
Save varnav/3ffcae710e843c40ffe9696cce3ad59c to your computer and use it in GitHub Desktop.
Graylog client playbook for Ansible
# Redirect everything that goes to syslog to Graylog
---
- hosts: localhost
tasks:
- name: Configuring Graylog client
lineinfile: line="*.* @172.16.5.147:5140;RSYSLOG_SyslogProtocol23Format"
dest="/etc/rsyslog.d/graylog.conf"
create=yes
notify:
- restart rsyslog
handlers:
- name: restart rsyslog
service: name=rsyslog state=restarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment