From 909a7ca71f4f7334d3f0873c3df94b66d0ee5d78 Mon Sep 17 00:00:00 2001 From: Jon Dison Date: Wed, 23 Jan 2019 16:06:44 -0500 Subject: [PATCH] message --- playbooks/graylog.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 playbooks/graylog.yml diff --git a/playbooks/graylog.yml b/playbooks/graylog.yml new file mode 100644 index 0000000..bd35210 --- /dev/null +++ b/playbooks/graylog.yml @@ -0,0 +1,22 @@ +--- +# a comment +- name: Configure Rsyslog for Graylog + hosts: all:!localhost + + tasks: + - name: Create Rsyslog configuration file + lineinfile: + path: /etc/rsyslog.d/99-graylog.conf + create: yes + owner: root + group: root + mode: 0644 + state: present + line: '*.* @@bionic-graylog:514;RSYSLOG_SyslogProtocol23Format' + register: lineinfile + + - name: Restart Rsyslog if necessary + service: + name: rsyslog + state: restarted + when: lineinfile.changed