modifications des playbooks journald snd et rcv

This commit is contained in:
root 2023-12-25 14:57:04 +01:00
parent d9fb25425d
commit 01faab4a6e
2 changed files with 17 additions and 10 deletions

View File

@ -1,16 +1,16 @@
---
- name: Installation de systemd-journal-remote
- name: 1. Installation de systemd-journal-remote
apt:
name: systemd-journal-remote
state: present
- name: Enable et start systemd-journal-remote.socket
- name: 2. Enable et start systemd-journal-remote.socket
systemd:
name: systemd-journal-remote.socket
enabled: yes
state: started
- name: Copie de systemd-journal-remote.service dans /etc/systemd/system
- name: 3. Copie de systemd-journal-remote.service dans /etc/systemd/system
copy:
src: /lib/systemd/system/systemd-journal-remote.service
dest: /etc/systemd/system/systemd-journal-remote.service
@ -18,20 +18,27 @@
backup: yes
- name: Modification de systemd-journal-remote.service
- name: 4. Modification de systemd-journal-remote.service
replace:
path: /etc/systemd/system/systemd-journal-remote.service
regexp: '--listen-https=-3'
replace: '--listen-http=-3'
- name: Creation /var/log/journal/remote directory
- name: 5. active le mode SplitMode en mode Host
replace:
path: /etc/systemd/journal-remote.conf
regexp: '^#\sSplitMode=host'
replace: 'SplitMode=host'
- name: 6. Creation /var/log/journal/remote directory
file:
path: /var/log/journal/remote
state: directory
owner: systemd-journal-remote
- name: Redemarrage de systemd
- name: 7. Redemarrage de systemd
systemd:
daemon_reload: yes
notify:
- restart jourald
# notify:
#- restart journald

View File

@ -8,7 +8,7 @@
- name: 2. indique l'URL journald distant
replace:
path: /etc/systemd/journal-upload.conf
regexp: '^#URL='
regexp: '^#\sURL='
replace: 'URL=http://syslog.gsb.adm:19532'
- name: 3. Just force systemd to reread configs (2.4 and above)
@ -23,7 +23,7 @@
- name: 5. redemarre systemd-journal-upload.service
service:
name: systemd-journal-upload.service
state: restart
state: restarted
#notify:
#- enable systemd-journal-upload
#- restart systemd-journal-upload