32 lines
767 B
YAML

---
- name: 1. installe systemd-journal-remote
apt:
name:
- systemd-journal-remote
state: present
- name: 2. indique l'URL journald distant
replace:
path: /etc/systemd/journal-upload.conf
regexp: '^#\sURL='
replace: 'URL=http://syslog.gsb.adm:19532'
- name: 3. Just force systemd to reread configs (2.4 and above)
ansible.builtin.systemd_service:
daemon_reload: true
- name: 4. active le service systemd-journald-upload
ansible.builtin.service:
name: systemd-journal-upload.service
enabled: yes
- name: 5. redemarre systemd-journal-upload.service
service:
name: systemd-journal-upload.service
state: restarted
#notify:
#- enable systemd-journal-upload
#- restart systemd-journal-upload