23 lines
590 B
YAML
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
|
|
|