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

feat: allow define node['fail2ban']['ignoreip'] as array #134

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

igolman
Copy link

@igolman igolman commented Mar 5, 2025

Description

This allows to define node['fail2ban']['ignoreip'] also as an array. This way users of default recipe may make use of deep merge of attributes and not be required to re-define this attribute in nested chef roles.

'deep merge' example:

base chef role:

name 'fail2ban_base'
run_list %w(
  recipe[fail2ban::default]
)

default_attributes(
  fail2ban: {
     ignoreip: %w(1.2.3.4)
     ...
  }
)

Then in another chef role:

name 'fail2ban_extend'

run_list %w(
  role[fail2ban_base]
)

default_attributes(
  fail2ban: {
     ignoreip: %w(5.6.7.8)
     ...
  }

results to: node['fail2ban']['ignoreip'] = [ '1.2.3.4', '5.6.7.8' ]

Issues Resolved

None.

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • [-] New functionality includes testing.
  • [-] New functionality has been documented in the README if applicable.

@igolman igolman requested a review from a team as a code owner March 5, 2025 14:45
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

Successfully merging this pull request may close these issues.

1 participant