Enable firewall rules to allow primary/replica to connect
This commit is contained in:
@@ -71,6 +71,18 @@ systemctl start #{postgresql_service}
|
||||
|
||||
# On the next Chef run the replica will be set up
|
||||
node.normal['kosmos-postgresql']['ready_to_set_up_replica'] = true
|
||||
|
||||
unless node.chef_environment == "development"
|
||||
include_recipe "firewall"
|
||||
|
||||
firewall_rule "postgresql" do
|
||||
port 5432
|
||||
protocol :tcp
|
||||
command :allow
|
||||
destination primary[:ipaddress]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
include_recipe "kosmos-postgresql::firewall"
|
||||
# TODO: We need to set up firewall rules and access rules for clients too
|
||||
# (Mastodon, ejabberd, etc)
|
||||
|
||||
Reference in New Issue
Block a user