Ver código fonte

fix(suse): skip service

SUSE based distributions do not use Cron, but instead a systemd
timer for running logrotate on a schedule.
As this timer is enabled through a systemd preset, skip the state
completely.

Signed-off-by: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
pull/71/head
Georg Pfuetzenreuter 4 meses atrás
pai
commit
26f74e58ac
Nenhuma conta vinculada ao e-mail do autor do commit
3 arquivos alterados com 7 adições e 0 exclusões
  1. +1
    -0
      logrotate/osfamilymap.yaml
  2. +4
    -0
      logrotate/service.sls
  3. +2
    -0
      test/integration/default/controls/base.rb

+ 1
- 0
logrotate/osfamilymap.yaml Ver arquivo

@@ -14,6 +14,7 @@ RedHat:
default_config:
dateext: true
Suse:
service: null
login_records_jobs: false
default_config:
dateext: true

+ 4
- 0
logrotate/service.sls Ver arquivo

@@ -3,6 +3,8 @@

{% from "logrotate/map.jinja" import logrotate with context %}

{%- if logrotate.service is not none %}

include:
- logrotate.config
- logrotate.install
@@ -15,3 +17,5 @@ logrotate:
- pkg: logrotate-pkg
- file: logrotate-config
- file: logrotate-directory

{%- endif %}

+ 2
- 0
test/integration/default/controls/base.rb Ver arquivo

@@ -49,6 +49,8 @@ control 'logrotate.service.running' do
'cronie'
when 'redhat', 'fedora'
'crond'
when 'suse'
'logrotate.timer'
else
'cron'
end

Carregando…
Cancelar
Salvar