--- - name: Настройка systemd-journal-upload hosts: all become: yes tasks: - name: Проверяем что systemd-journal-upload включен как служба и работает. systemd: name: systemd-journal-upload state: started enabled: true - name: Настройка конфига systemd-journal-upload copy: dest: /etc/systemd/journal-upload.conf mode: '0644' content: | [Upload] # URL= # ServerKeyFile=/etc/ssl/private/journal-upload.pem # ServerCertificateFile=/etc/ssl/certs/journal-upload.pem # TrustedCertificateFile=/etc/ssl/ca/trusted.pem URL=http://victorialogs.guaranteedstruggle.host:9428/insert/journald register: journald_config - name: Перезапуск службы при изменении настроек systemd: name: systemd-journal-upload state: restarted when: journald_config.changed