24 lines
585 B
YAML
24 lines
585 B
YAML
---
|
|
- hosts: adm
|
|
name: rsyslog-server-configure
|
|
tasks:
|
|
- name: activation du module imudp...
|
|
ansible.builtin.replace:
|
|
path: /etc/rsyslog.conf
|
|
regexp: '^#module\(load="imudp"\)'
|
|
replace: 'module(load="imudp")'
|
|
|
|
- name: ouverture du port 514...
|
|
ansible.builtin.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
|
|
|