46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
---
|
|
- hosts: web
|
|
tasks:
|
|
- name: decommente forwardtosyslog dans journald.conf
|
|
replace:
|
|
path: /etc/systemd/journald.conf
|
|
regexp: '^#ForwardToSyslog=yes'
|
|
replace: 'ForwardToSyslog=yes'
|
|
backup: true
|
|
notify: Restart journald
|
|
|
|
- name: modifier RateLimitInterval dans journald.conf
|
|
replace:
|
|
path: /etc/systemd/journald.conf
|
|
regexp: '^#RateLimitIntervalSec=30s'
|
|
replace: 'RateLimitIntervalSec=0'
|
|
backup: true
|
|
notify: Restart journald
|
|
|
|
- name: modifier RateLimitBurst dans journald.conf
|
|
replace:
|
|
path: /etc/systemd/journald.conf
|
|
regexp: '^#RateLimitBurst=10000'
|
|
replace: 'RateLimitBurst=0'
|
|
backup: true
|
|
notify: Restart journald
|
|
|
|
- name: deplacer log vers un serveur distant
|
|
lineinfile:
|
|
path: /etc/rsyslog.conf
|
|
line: '*.* @192.168.0.24:514'
|
|
backup: true
|
|
notify: Restart rsyslog
|
|
|
|
handlers:
|
|
- name: Restart journald
|
|
service:
|
|
name: systemd-journald.service
|
|
state: restarted
|
|
|
|
- name: Restart rsyslog
|
|
service:
|
|
name: rsyslog
|
|
state: restarted
|
|
|