siotp/sio1/sisr1/80-ansible/tpansible/syslog-server-configure.yml
2022-10-13 09:05:35 +02:00

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