Fix the firewall rules for PostgreSQL

I got the source and destination mixed up.
This commit is contained in:
Greg Karékinian 2020-05-15 18:44:42 +02:00
parent 4475af9204
commit 31dc14e88c
2 changed files with 4 additions and 4 deletions

View File

@ -62,11 +62,11 @@ postgresql_replicas.each do |replica|
unless node.chef_environment == "development" unless node.chef_environment == "development"
include_recipe "firewall" include_recipe "firewall"
firewall_rule "postgresql" do firewall_rule "postgresql replica #{replica[:hostname]}" do
port 5432 port 5432
protocol :tcp protocol :tcp
command :allow command :allow
destination replica[:ipaddress] source replica[:ipaddress]
end end
end end
end end

View File

@ -72,11 +72,11 @@ systemctl start #{postgresql_service}
unless node.chef_environment == "development" unless node.chef_environment == "development"
include_recipe "firewall" include_recipe "firewall"
firewall_rule "postgresql" do firewall_rule "postgresql primary #{primary[:hostname]}" do
port 5432 port 5432
protocol :tcp protocol :tcp
command :allow command :allow
destination primary[:ipaddress] source primary[:ipaddress]
end end
end end
end end