Closed billmetangmo closed 3 years ago
Thanks @billmetangmo for this, I've just pushed some 50 or so commits, CI will take a moment.
Looks good overall, I'll inspect the details when CI has passed. Let me know if you need help with getting the tests green.
Regards,
Robert de Bock.
Thanks @robertdebock . I need your help: It seems to have an issue with the below assert:
- name: test if rsyslog_dircreatemode is set correctly
assert:
that:
- rsyslog_dircreatemode is defined
- rsyslog_dircreatemode is number
- rsyslog_dircreatemode | regex_search('^0')
quiet: yes
I got an error with
fatal: [rsyslog-alpine-latestpy38-ansible-current]: FAILED! => changed=false
assertion: rsyslog_dircreatemode | regex_search('^0')
evaluated_to: false
msg: Assertion failed
I think it's the same you have with your last commit as rsyslog_dircreatemode is now a number.
I tried to replaceregex_search('^0')
by regex_search('^[0][0-7]{3}')
but it does not work.
You can remove this assertion:
- rsyslog_dircreatemode | regex_search('^0')
It's a bit overkill anyway. Thanks!
Yes, CI passes, congratulations. Let me check all the proposed changes.
Nice, let me know if there is an issue.
I'll merge, but will undo a few things:
rsyslog_dircreatemode: "0700"
I think the value 0700
needs to be quoted, otherwise the leading 0
may be lost. This means I'l restore - rsyslog_dircreatemode | int
.
Anyway, I'll merge, work on it a bit and have it included in the next version. Thanks!
Thanks @robertdebock
Hi Robert, thanks for sharing your role with community.
name: Added forward rule in rsyslog directory about: rsyslog forward rule file
Describe the change
Currently the log forwads rule is written directly in rsyslog.conf, this means that the default config is overwritten. This can cause issues because some want to keep default rsyslog config. In my case ( debian duster 10), it was different from your default legacy/advanced file so i needed a way to keep it as it is and just a dd a forward rule.
Here's my rsyslo conf file:
Also, when rsyslog_deploy_default_config is set to false, rsyslog can't start because no rules were added. I changed the behaviour rsyslog_deploy_default_config so that:
Testing Molecule test provided