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
33 lines
720 B
YAML
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
|