Skip to content

Commit

Permalink
Merge pull request #43 from ai4os/nomad_pub_ip
Browse files Browse the repository at this point in the history
Use public IP if defined
  • Loading branch information
micafer authored Oct 2, 2024
2 parents 904b8ee + 9664ba0 commit e68b811
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion roles/nomad/templates/nomad_server.j2
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,18 @@ consul {
server_auto_join = true
client_auto_join = true
}



{% if my_public_ip is defined and my_public_ip != "" %}
advertise{
http = "{{ my_public_ip }}:4646"
rpc = "{{ my_public_ip }}:4647"
serf = "{{ my_public_ip }}:4648"
}
{% else %}
advertise{
http = "{{ my_ip }}:4646"
rpc = "{{ my_ip }}:4647"
serf = "{{ my_ip }}:4648"
}
{% endif %}

0 comments on commit e68b811

Please sign in to comment.