Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration validation fails on file with rsyslog 8.2001.0 #14

Open
yoannrt opened this issue Feb 3, 2022 · 0 comments
Open

Configuration validation fails on file with rsyslog 8.2001.0 #14

yoannrt opened this issue Feb 3, 2022 · 0 comments

Comments

@yoannrt
Copy link

yoannrt commented Feb 3, 2022

Bug description

When I use rsyslog_rsyslog_d_files: to generate a config file under /etc/rsyslog.d/ I get the followind error on validation step

- name: update specific configuration files
  template:
    src: etc/rsyslog.d/rsyslog.conf.j2
    dest: "/etc/rsyslog.d/{{ item.key }}.conf"
    validate: "{{ 'rsyslogd -N1 -f %s' if item.value.validate | default(true) else 'true %s' }}"
rsyslogd: imfile: no working or state file directory set, imfile will create state files in the current working directory (probably the root dir). Use global(workDirectory="/some/path") to set the working directory [v8.2001.0 try https://www.rsyslog.com/e/2450 ]

Environnement

Occurs on Ubuntu 20.04 with rsyslogd version 8.2001.0

Workaround

The only workaround I found for the moment is to add the parameter WorkDirectory in the config file (even if the parameter is already set under /etc/rsyslog.conf)

rsyslog_rsyslog_d_presets_23_fail2ban:
  rules:
    - rule: '$ModLoad'
      logpath: 'imfile'
    - rule: '$WorkDirectory'
      logpath: '/var/spool/rsyslog'

I searched a bit for a cleaner workaround or fix but I'm stuck on this. Maybe anyone has an idea to fix this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants