Skip to content

Commit

Permalink
apache-botsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
deric committed Sep 2, 2020
1 parent 544ede9 commit 1759719
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 14 deletions.
8 changes: 8 additions & 0 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ class { 'fail2ban': }
port: '80,443'
apache-nohome:
port: '80,443'
apache-botsearch:
port: '80,443'
EOS
shell "echo \"#{yaml}\" > /etc/puppetlabs/code/environments/production/data/common.yaml"

Expand Down Expand Up @@ -355,6 +357,12 @@ class { 'fail2ban': }
expect(r.stdout).to match %r{^port\s+\=\s+80,443$}
end
end

it 'is expected to modify apache-botsearch port' do
shell("grep \"\\[apache-botsearch\\]\" -A 6 #{config_file_path}") do |r|
expect(r.stdout).to match %r{^port\s+\=\s+80,443$}
end
end
end
end
end
4 changes: 2 additions & 2 deletions templates/CentOS/6/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ maxretry = 2


[apache-botsearch]
enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = http,https
enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = <%= lookup('fail2ban::jails_config.apache-botsearch.port', String, undef, 'http,https') %>
logpath = %(apache_error_log)s
maxretry = 2

Expand Down
4 changes: 2 additions & 2 deletions templates/CentOS/7/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ maxretry = 2


[apache-botsearch]
enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = http,https
enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = <%= lookup('fail2ban::jails_config.apache-botsearch.port', String, undef, 'http,https') %>
logpath = %(apache_error_log)s
maxretry = 2

Expand Down
2 changes: 1 addition & 1 deletion templates/CentOS/8/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ maxretry = 2

[apache-botsearch]
enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = http,https
port = <%= lookup('fail2ban::jails_config.apache-botsearch.port', String, undef, 'http,https') %>
logpath = %(apache_error_log)s
maxretry = 2

Expand Down
2 changes: 1 addition & 1 deletion templates/Debian/10/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ maxretry = 2
[apache-botsearch]

enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = http,https
port = <%= lookup('fail2ban::jails_config.apache-botsearch.port', String, undef, 'http,https') %>
logpath = %(apache_error_log)s
maxretry = 2

Expand Down
2 changes: 1 addition & 1 deletion templates/Debian/9/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ maxretry = 2
[apache-botsearch]

enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = http,https
port = <%= lookup('fail2ban::jails_config.apache-botsearch.port', String, undef, 'http,https') %>
logpath = %(apache_error_log)s
maxretry = 2

Expand Down
4 changes: 2 additions & 2 deletions templates/RedHat/6/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ maxretry = 2


[apache-botsearch]
enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = http,https
enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = <%= lookup('fail2ban::jails_config.apache-botsearch.port', String, undef, 'http,https') %>
logpath = %(apache_error_log)s
maxretry = 2

Expand Down
4 changes: 2 additions & 2 deletions templates/RedHat/7/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ maxretry = 2


[apache-botsearch]
enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = http,https
enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = <%= lookup('fail2ban::jails_config.apache-botsearch.port', String, undef, 'http,https') %>
logpath = %(apache_error_log)s
maxretry = 2

Expand Down
2 changes: 1 addition & 1 deletion templates/RedHat/8/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ maxretry = 2

[apache-botsearch]
enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = http,https
port = <%= lookup('fail2ban::jails_config.apache-botsearch.port', String, undef, 'http,https') %>
logpath = %(apache_error_log)s
maxretry = 2

Expand Down
2 changes: 1 addition & 1 deletion templates/Ubuntu/16.04/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ maxretry = 2
[apache-botsearch]

enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = http,https
port = <%= lookup('fail2ban::jails_config.apache-botsearch.port', String, undef, 'http,https') %>
logpath = %(apache_error_log)s
maxretry = 2

Expand Down
2 changes: 1 addition & 1 deletion templates/Ubuntu/18.04/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ maxretry = 2
[apache-botsearch]

enabled = <%= "apache-botsearch" in $fail2ban::jails %>
port = http,https
port = <%= lookup('fail2ban::jails_config.apache-botsearch.port', String, undef, 'http,https') %>
logpath = %(apache_error_log)s
maxretry = 2

Expand Down

0 comments on commit 1759719

Please sign in to comment.