diff --git a/netmaker_server/tasks/prerequisites.yml b/netmaker_server/tasks/prerequisites.yml index a9d91f9..90a1b86 100644 --- a/netmaker_server/tasks/prerequisites.yml +++ b/netmaker_server/tasks/prerequisites.yml @@ -7,4 +7,3 @@ - name: Check if default-ipv4-address is private set_fact: private_ipv4_address: "{{ ansible_facts.default_ipv4.address | regex_search('^((10)|(192\\.168)|(172\\.((1[6-9])|(2[0-9])|(3[0-1])))|(100))\\.') }}" - when: "netmaker.dynamicIp" diff --git a/netmaker_server/templates/docker-compose.yml.template b/netmaker_server/templates/docker-compose.yml.template index ec380dd..69b7b41 100644 --- a/netmaker_server/templates/docker-compose.yml.template +++ b/netmaker_server/templates/docker-compose.yml.template @@ -63,7 +63,7 @@ services: NODE_ID: "{{ ansible_facts.nodename }}" MASTER_KEY: "{{ netmaker.master_key }}" # The admin master key for accessing the API. Change this in any production installation. -{% if not private_ipv4_address %} +{% if not private_ipv4_address and not netmaker.dynamicIp %} SERVER_HOST: "{{ ansible_facts.default_ipv4.address }}" # Set to public IP of machine. {% endif %} SERVER_NAME: "netmaker-broker.{{ netmaker.base_domain }}" # The domain/host IP indicating the mq broker address