ajout script
This commit is contained in:
parent
4425d39585
commit
b4504cadc6
22
sio2/sisr2/40-Ansible/rsyslog-cli.yml
Normal file
22
sio2/sisr2/40-Ansible/rsyslog-cli.yml
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
- hosts: web
|
||||
tasks:
|
||||
- name: decommente l'option ForwardToSyslog
|
||||
replace:
|
||||
path: /etc/systemd/journald.conf
|
||||
regexp: '^#ForwardToSyslog=yes'
|
||||
replace: 'ForwardToSyslog=yes'
|
||||
backup: true
|
||||
notify: Restart systemd-journald.service
|
||||
|
||||
- name: Ajoute l'indication de serveur syslog distant si elle n'est pas presente
|
||||
lineinfile:
|
||||
path: /etc/rsyslog.conf
|
||||
line: '*.* @192.168.0.34:514'
|
||||
create: yes
|
||||
|
||||
handlers:
|
||||
- name: Restart systemd-journald.service
|
||||
service:
|
||||
name: systemd-journald.service
|
||||
state: restarted
|
Loading…
x
Reference in New Issue
Block a user