--- - hosts: web tasks: - name: decommente l'option ForwardToSyslog replace: path: /etc/systemd/journald.conf regexp: '^#ForwardToSyslog=yes' replace: 'ForwardToSyslog=yes' backup: true notify: Restart systemd-journald.service handlers: - name: Restart systemd-journald.service service: name: systemd-journald.service state: restarted - name: Ajoute l'indication de serveur syslog distant si elle n'est pas presente lineinfile: path: /etc/rsyslog.conf line: '*.* @192.168.0.42:514' create: yes