From 506f4c54750f08233f310a86c25973331b8ffb72 Mon Sep 17 00:00:00 2001 From: "johan.largy" Date: Tue, 11 Oct 2022 09:23:08 +0200 Subject: [PATCH] ajout script --- sio2/sisr2/40-Ansible/syslog.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sio2/sisr2/40-Ansible/syslog.yml diff --git a/sio2/sisr2/40-Ansible/syslog.yml b/sio2/sisr2/40-Ansible/syslog.yml new file mode 100644 index 0000000..9d4eab9 --- /dev/null +++ b/sio2/sisr2/40-Ansible/syslog.yml @@ -0,0 +1,24 @@ +--- +- hosts: infra + tasks: + - name: decommente le chargement du module imudp dans rsyslog.conf + replace: + path: /etc/rsyslog.conf + regexp: '^#module\(load="imudp"\)' + replace: 'module(load="imudp")' + backup: true + notify: Restart Rsyslog + + - name: decommente le chargement du module imudp dans rsyslog.conf + replace: + path: /etc/rsyslog.conf + regexp: '^#input\(type="imudp" port="514"\)' + replace: 'input(type="imudp" port="514")' + backup: true + notify: Restart Rsyslog + + handlers: + - name: Restart Rsyslog + service: + name: rsyslog + state: restarted