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