robertdebock / ansible-role-rsyslog

Install and configure rsyslog on your system.
https://robertdebock.nl/
Apache License 2.0
36 stars 40 forks source link

Empty forward rule file created #43

Open jlownie opened 1 year ago

jlownie commented 1 year ago

Empty forward rule file created

I set rsyslog_deploy_default_config: no and got this error:

TASK [robertdebock.rsyslog : Configuring rsyslog forward rule] *****************
fatal: [myhostname]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'rsyslog_forward_rule_name' is undefined\n\nThe error appears to be in '/runner/requirements_roles/robertdebock.rsyslog/tasks/main.yml': line 41, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Configuring rsyslog forward rule\n  ^ here\n"}

I then set rsyslog_forward_rule_name: forwarding and it generated this file:

#
# Ansible managed
#

# ### begin forwarding rule ###
# The statement between the begin ... end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#

# ### end of the forwarding rule ###

I don't understand the purpose of this so I thought I'd ask if the role is behaving as intended?

Playbook

---
- hosts: "all"
  roles:
    - role: robertdebock.rsyslog
      vars:
        rsyslog_deploy_default_config: no
        rsyslog_forward_rule_name: forwarding

Output

As described above.

Environment