Fix the firewall rules for PostgreSQL
I got the source and destination mixed up.
This commit is contained in:
parent
4475af9204
commit
31dc14e88c
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user