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

Add ignoreip parameter to jail class and template #60

Merged

Conversation

leonkoens
Copy link
Contributor

Pull Request (PR) description

This pull request adds support for defining ignoreip's in the fail2ban jails.

@bastelfreak
Copy link
Member

Hi @leonkoens, thanks for the PR. Can you please document the new parameter in the README.md?

@bastelfreak bastelfreak added the needs-work not ready to merge just yet label May 17, 2018
@@ -14,6 +14,7 @@
Integer $bantime = $fail2ban::bantime,
Optional[String] $port = undef,
Optional[String] $backend = undef,
Optional[Array] $ignoreip = undef,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at our review guidelines:

Are there new params with datatype Hash or Array? If possible, they should default to empty Hash/Array instead of undef. You can also enforce the datastructure like Array[String]

Can you please migration the Datatype to something like Array[String[1]]? What kind of ip addresses are valid? Stdlib has quite some datatypes. One of them is probably useful in this case so it could even be Array[Stdlib::IP::Address]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to update the lowest supported stdlib version in the metadata.json as well, since the new types got introduces in stdlib 4.25.0.

@@ -14,6 +14,7 @@
Integer $bantime = $fail2ban::bantime,
Optional[String] $port = undef,
Optional[String] $backend = undef,
Optional[Array[Stdlib::IP::Address]] $ignoreip = [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove the Optional[]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, I was wondering if this was still necessary. Removing it.

@bastelfreak bastelfreak added enhancement New feature or request and removed needs-work not ready to merge just yet labels May 17, 2018
@bastelfreak bastelfreak merged commit 12d6c6c into voxpupuli:master May 17, 2018
@leonkoens leonkoens deleted the feature/add-ignoreip-parameter branch May 18, 2018 08:34
cegeka-jenkins pushed a commit to cegeka/puppet-fail2ban that referenced this pull request Mar 30, 2020
…arameter

Add ignoreip parameter to jail class and template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants