-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from traylenator/consolidate
Consolidate jail.conf.epp for RedHat osfamily
- Loading branch information
Showing
12 changed files
with
66 additions
and
5,717 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
--- | ||
fail2ban::config_file_before: 'paths-fedora.conf' | ||
fail2ban::config_file_template: "fail2ban/RedHat/%{facts.os.release.major}/etc/fail2ban/jail.conf.epp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
fail2ban::config_file_before: 'paths-fedora.conf' | ||
fail2ban::config_file_template: "fail2ban/CentOS/7/etc/fail2ban/jail.conf.epp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,8 +137,12 @@ class { 'fail2ban': } | |
context 'when content template' do | ||
it 'is_expected.to work with no errors' do | ||
pp = <<-EOS | ||
$_config_file_template = $facts['os']['family'] ? { | ||
'RedHat' => "fail2ban/RedHat/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
default => "fail2ban/#{fact('os.name')}/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
} | ||
class { 'fail2ban': | ||
config_file_template => "fail2ban/#{fact('os.name')}/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
config_file_template => $_config_file_template, | ||
} | ||
EOS | ||
|
||
|
@@ -155,8 +159,12 @@ class { 'fail2ban': | |
context 'when content template and custom chain' do | ||
it 'is_expected.to work with no errors' do | ||
pp = <<-EOS | ||
$_config_file_template = $facts['os']['family'] ? { | ||
'RedHat' => "fail2ban/RedHat/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
default => "fail2ban/#{fact('os.name')}/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
} | ||
class { 'fail2ban': | ||
config_file_template => "fail2ban/#{fact('os.name')}/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
config_file_template => $_config_file_template, | ||
iptables_chain => 'TEST', | ||
} | ||
EOS | ||
|
@@ -174,8 +182,12 @@ class { 'fail2ban': | |
context 'when content template and custom banaction' do | ||
it 'is_expected.to work with no errors' do | ||
pp = <<-EOS | ||
$_config_file_template = $facts['os']['family'] ? { | ||
'RedHat' => "fail2ban/RedHat/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
default => "fail2ban/#{fact('os.name')}/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
} | ||
class { 'fail2ban': | ||
config_file_template => "fail2ban/#{fact('os.name')}/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
config_file_template => $_config_file_template, | ||
banaction => 'iptables' | ||
} | ||
EOS | ||
|
@@ -192,8 +204,12 @@ class { 'fail2ban': | |
context 'when content template and custom sender' do | ||
it 'is_expected.to work with no errors' do | ||
pp = <<-EOS | ||
$_config_file_template = $facts['os']['family'] ? { | ||
'RedHat' => "fail2ban/RedHat/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
default => "fail2ban/#{fact('os.name')}/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
} | ||
class { 'fail2ban': | ||
config_file_template => "fail2ban/#{fact('os.name')}/#{fact('os.release.major')}/#{config_file_path}.epp", | ||
config_file_template => $_config_file_template, | ||
sender => '[email protected]', | ||
} | ||
EOS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.