- hosts: web tasks: - name: on decommente l'option ForwardToSyslog=yes dans /etc/systemd/journald> replace: path: /etc/systemd/journald.conf regexp: '^#ForwardToSyslog=yes' replace: 'ForwardToSyslog=yes' notify: - restart journald - name: Ajoute l'indication de serveur syslog distant lineinfile: path: /etc/rsyslog.conf line: '*.* @192.168.0.37:514' create: yes notify: - restart rsyslog handlers: - name: restart journald service: name: systemd-journald.service state: restarted - name: restart rsyslog service: name: rsyslog state: restarted