--- # Copyright 2018, Rackspace US, Inc. # Copyright 2022, City Network International AB. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. journald_remote_package_state: "{{ package_state | default('present') }}" journald_remote_log_path: /var/log/journal/remote journald_remote_system_user: systemd-journal-remote journald_remote_system_group: systemd-journal-remote journald_remote_system_slice_name: systemd-journal-remote journald_remote_systemd_prefix: "/lib/systemd" journald_remote_targets: "{{ groups['log_hosts'] | map('extract', hostvars, 'ansible_host') | list }}" # Must be either a negative integer, in which case it will be interpreted as the (negated) # file descriptor number, or an address suitable for ListenStream. # Please reference doc: https://www.freedesktop.org/software/systemd/man/systemd-journal-remote.service.html journald_remote_target_listen_address: "{{ ansible_host }}" journald_remote_target_listen_port: 19532 journald_remote_target_listen_proto: http journald_remote_max_files: "{{ ((((ansible_play_hosts_all | length) * 1.5) + (ansible_play_hosts_all | length)) // 1) | int }}" journald_remote_config_options: - key: RuntimeMaxFiles value: "{{ journald_remote_max_files }}" - key: RuntimeMaxFileSize value: "5G" - key: Compress value: "yes" - key: MaxFileSec value: "1d" - key: MaxRetentionSec value: "2d" journald_remote_services: "{{ (ansible_host in journald_remote_targets) | ternary(_journald_remote_target_services, _journald_remote_source_services) }}"