Use the PG primary private Zerotier IP if it exists
This commit is contained in:
parent
88e52607e3
commit
dd78b8cf7e
@ -25,10 +25,16 @@ class Chef
|
|||||||
def ip_for(server_node)
|
def ip_for(server_node)
|
||||||
if node.chef_environment == "development"
|
if node.chef_environment == "development"
|
||||||
server_node['network']['interfaces']['eth1']['routes'].first['src']
|
server_node['network']['interfaces']['eth1']['routes'].first['src']
|
||||||
|
else
|
||||||
|
# If the server has a private Zerotier IP, use it
|
||||||
|
if server_node['knife_zero'] && server_node['knife_zero']['host'] && \
|
||||||
|
server_node['knife_zero']['host'].start_with?("10.1.1.")
|
||||||
|
server_node['knife_zero']['host']
|
||||||
else
|
else
|
||||||
server_node['ipaddress']
|
server_node['ipaddress']
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def postgresql_service_name
|
def postgresql_service_name
|
||||||
postgresql_version = "12"
|
postgresql_version = "12"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user