siotp/sio2/SISR/09-ansible/rsyslog/syslog-cli.yml
root 8736176b70 renommé : sio2/SISR/09-ansible/syslog-cli.yml -> sio2/SISR/09-ansible/rsyslog/syslog-cli.yml
renommé :         sio2/SISR/09-ansible/syslog.yml -> sio2/SISR/09-ansible/rsyslog/syslog.yml
	supprimé :        sio2/SISR/09-ansible/squid.conf.j2
	renommé :         sio2/SISR/09-ansible/squid.yml -> sio2/SISR/09-ansible/squid/squid.yml
	renommé :         sio2/SISR/09-ansible/index.html -> sio2/SISR/09-ansible/web/index.html
	renommé :         sio2/SISR/09-ansible/web.yml -> sio2/SISR/09-ansible/web/web.yml
2024-10-11 11:37:18 +02:00

33 lines
720 B
YAML

---
- hosts: web
tasks:
- name: installation de rsyslog
apt:
name: rsyslog
state: present
- name: decommenter la ligne ForwardToSyslog=yes
replace:
path: /etc/systemd/journald.conf
regexp: '^#ForwardToSyslog=yes'
replace: 'ForwardToSyslog=yes'
notify: restart journald
- name: serveur distant est present
lineinfile:
path: /etc/rsyslog.conf
line: '*.*@192.168.0.21:514'
create: yes
notify: restart rsyslog
handlers:
- name: restart journald
service:
name: systemd.journald
state: restarted
- name: restart rsyslog
service:
name: rsyslog
state: restarted