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

Missing directories when using custom jails #117

Closed
danifr opened this issue Oct 10, 2019 · 4 comments
Closed

Missing directories when using custom jails #117

danifr opened this issue Oct 10, 2019 · 4 comments

Comments

@danifr
Copy link
Member

danifr commented Oct 10, 2019

There are couple of missing directories when you configure the module to use custom jails.

Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /etc/fail2ban/filter.d/keycloak.conf20191010-753-xx1ht4.lock (file: /mnt/puppetnfsdir/environments/dev_danielfr/modules/fail2ban/manifests/jail.pp, line: 32)
Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /etc/fail2ban/filter.d/keycloak.conf20191010-753-xx1ht4.lock (file: /mnt/puppetnfsdir/environments/dev_danielfr/modules/fail2ban/manifests/jail.pp, line: 32)
Wrapped exception:
No such file or directory @ dir_s_mkdir - /etc/fail2ban/filter.d/keycloak.conf20191010-753-xx1ht4.lock
Error: /Stage[main]/Fail2ban::Config/Fail2ban::Jail[keycloak]/File[custom_filter_keycloak]/ensure: change from 'absent' to 'file' failed: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /etc/fail2ban/filter.d/keycloak.conf20191010-753-xx1ht4.lock (file: /mnt/puppetnfsdir/environments/dev_danielfr/modules/fail2ban/manifests/jail.pp, line: 32) (corrective)

Namely filter.d and jail.d.

I'll add a PR to fix this soon.
Thanks.

@traylenator
Copy link
Contributor

The directory /etc/fail2ban/filter.d is in the package I have anyway?

rpm -qf //etc/fail2ban/filter.d
fail2ban-server-0.10.0-1.ai7.noarch

@traylenator
Copy link
Contributor

traylenator commented Oct 10, 2019

With default EPEL7 package:

# rpm -qf /etc/fail2ban/jail.d /etc/fail2ban/action.d/
fail2ban-server-0.9.7-1.el7.noarch
fail2ban-server-0.9.7-1.el7.noarch

@traylenator
Copy link
Contributor

Understood now.

The jail entries do not require the package fail2ban-server , only fail2ban

This test case of trival jail would make an excellent addition to the acceptance tests.

@dhoppe
Copy link
Member

dhoppe commented Apr 21, 2020

I think this issue can be closed, since all supported operating systems will provide these directories by default.

@dhoppe dhoppe closed this as completed Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants