bb0f9f
{% set osmajorrelease = salt['grains.get']('osmajorrelease') %}
Theo Chatzimichos f46ac3
{% set roles = salt['grains.get']('roles', []) %}
Theo Chatzimichos f46ac3
Theo Chatzimichos f46ac3
include:
Theo Chatzimichos f46ac3
  - rsyslog
bb0f9f
Theo Chatzimichos f46ac3
rsyslog_host:
Theo Chatzimichos f46ac3
  host.present:
Theo Chatzimichos f46ac3
    - ip: {{ salt['pillar.get']('profile:log:rsyslog_host') }}
Theo Chatzimichos f46ac3
    - names:
Theo Chatzimichos f46ac3
        - monitor.infra.opensuse.org
Theo Chatzimichos f46ac3
        - syslog.infra.opensuse.org
Theo Chatzimichos f46ac3
        - monitor
Theo Chatzimichos f46ac3
        - syslog
Theo Chatzimichos f46ac3
Theo Chatzimichos e3440e
systemd-logger:
Theo Chatzimichos e3440e
  pkg.removed:
Theo Chatzimichos e3440e
    - require_in:
Theo Chatzimichos e3440e
        - pkg: rsyslog
Theo Chatzimichos e3440e
Theo Chatzimichos f46ac3
# TODO: replace with a proper logrotate formula
bb0f9f
{% if osmajorrelease in ['12', '42'] %}
bb0f9f
logrotate.timer:
bb0f9f
  service.running:
bb0f9f
    - enable: True
bb0f9f
{% endif %}