Skip to content

Commit

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

Expand Down Expand Up @@ -496,6 +498,12 @@ class { 'fail2ban': }
end
end
end

it 'is expected to modify sogo-auth port' do
shell("grep \"\\[sogo-auth\\]\" -A 6 #{config_file_path}") do |r|
expect(r.stdout).to match %r{^port\s+\=\s+80,443$}
end
end
end
end
end
2 changes: 1 addition & 1 deletion templates/CentOS/6/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ enabled = <%= "sogo-auth" in $fail2ban::jails %>
# Monitor SOGo groupware server
# without proxy this would be:
# port = 20000
port = http,https
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
logpath = /var/log/sogo/sogo.log


Expand Down
2 changes: 1 addition & 1 deletion templates/CentOS/7/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ enabled = <%= "sogo-auth" in $fail2ban::jails %>
# Monitor SOGo groupware server
# without proxy this would be:
# port = 20000
port = http,https
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
logpath = /var/log/sogo/sogo.log


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 @@ -431,7 +431,7 @@ logpath = /home/groupoffice/log/info.log
# without proxy this would be:
# port = 20000
enabled = <%= "sogo-auth" in $fail2ban::jails %>
port = http,https
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
logpath = /var/log/sogo/sogo.log


Expand Down
4 changes: 2 additions & 2 deletions templates/Debian/10/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ logpath = /home/groupoffice/log/info.log
# without proxy this would be:
# port = 20000
enabled = <%= "sogo-auth" in $fail2ban::jails %>
port = http,https
logpath = /var/log/sogo/sogo.log
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
logpath = /var/log/sogo/sogo.log


[tine20]
Expand Down
2 changes: 1 addition & 1 deletion templates/Debian/8/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ logpath = /var/log/roundcube/userlogins

enabled = <%= "sogo-auth" in $fail2ban::jails %>
filter = sogo-auth
port = http, https
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
# without proxy this would be:
# port = 20000
logpath = /var/log/sogo/sogo.log
Expand Down
4 changes: 2 additions & 2 deletions templates/Debian/9/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ logpath = /home/groupoffice/log/info.log
# without proxy this would be:
# port = 20000
enabled = <%= "sogo-auth" in $fail2ban::jails %>
port = http,https
logpath = /var/log/sogo/sogo.log
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
logpath = /var/log/sogo/sogo.log


[tine20]
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 @@ -383,8 +383,8 @@ logpath = /home/groupoffice/log/info.log
# without proxy this would be:
# port = 20000
enabled = <%= "sogo-auth" in $fail2ban::jails %>
port = http,https
logpath = /var/log/sogo/sogo.log
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
logpath = /var/log/sogo/sogo.log


[tine20]
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 @@ -383,8 +383,8 @@ logpath = /home/groupoffice/log/info.log
# without proxy this would be:
# port = 20000
enabled = <%= "sogo-auth" in $fail2ban::jails %>
port = http,https
logpath = /var/log/sogo/sogo.log
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
logpath = /var/log/sogo/sogo.log


[tine20]
Expand Down
6 changes: 3 additions & 3 deletions templates/RedHat/8/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,9 @@ logpath = /home/groupoffice/log/info.log
# Monitor SOGo groupware server
# without proxy this would be:
# port = 20000
enabled = <%= "sogo-auth" in $fail2ban::jails %>
port = http,https
logpath = /var/log/sogo/sogo.log
enabled = <%= "sogo-auth" in $fail2ban::jails %>
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
logpath = /var/log/sogo/sogo.log


[tine20]
Expand Down
6 changes: 3 additions & 3 deletions templates/Ubuntu/16.04/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,11 @@ logpath = /home/groupoffice/log/info.log

[sogo-auth]
# Monitor SOGo groupware server
enabled = <%= "sogo-auth" in $fail2ban::jails %>
enabled = <%= "sogo-auth" in $fail2ban::jails %>
# without proxy this would be:
# port = 20000
port = http,https
logpath = /var/log/sogo/sogo.log
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
logpath = /var/log/sogo/sogo.log


[tine20]
Expand Down
4 changes: 2 additions & 2 deletions templates/Ubuntu/18.04/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ logpath = /home/groupoffice/log/info.log
# without proxy this would be:
# port = 20000
enabled = <%= "sogo-auth" in $fail2ban::jails %>
port = http,https
logpath = /var/log/sogo/sogo.log
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
logpath = /var/log/sogo/sogo.log


[tine20]
Expand Down
4 changes: 2 additions & 2 deletions templates/Ubuntu/20.04/etc/fail2ban/jail.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ logpath = /home/groupoffice/log/info.log
# without proxy this would be:
# port = 20000
enabled = <%= "sogo-auth" in $fail2ban::jails %>
port = http,https
logpath = /var/log/sogo/sogo.log
port = <%= lookup('fail2ban::jails_config.sogo-auth.port', String, undef, 'http,https') %>
logpath = /var/log/sogo/sogo.log


[tine20]
Expand Down

0 comments on commit 2c8e79d

Please sign in to comment.