tp-sio/testansible/tpansible/syslog-cli.yml
2020-11-10 15:24:33 +01:00

19 lines
369 B
YAML

#playbook.yml
---
- hosts: adm
tasks:
- name: Ajoute l'indication de serveur syslog distant si elle n'est pas presente
lineinfile:
path: /etc/rsyslog.conf
line: '*.* @192.168.0.32:514'
create: yes
backup: yes
notify: Restart rsyslog
handlers:
- name: Restart rsyslog
service:
name: rsyslog
state: restarted