tpsio/testansible/syslog.yml
“cameron.desrayaud” 928fda2aa8 ajout yml
2022-01-24 14:24:14 +01:00

23 lines
590 B
YAML

- hosts: adm
tasks:
- name: on active le module imudp dans /etc/rsyslog.conf
replace:
path: /etc/rsyslog.conf
regexp: '^#module\(load="imudp"\)'
replace: 'module(load="imudp")'
notify:
- restart rsyslog
- name: on decommente la ligne input type imudp port 514 dans /etc/rsyslog.conf
replace:
path: /etc/rsyslog.conf
regexp: '^#input\(type="imudp" port="514"\)'
replace: 'input(type="imudp" port="514")'
notify:
- restart rsyslog
handlers:
- name: restart rsyslog
service:
name: rsyslog
state: restarted