From 02d74065cbbf45ec7680f1f4912e6ed46c063022 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 12 Sep 2017 15:34:18 +0200 Subject: [PATCH] library/roles/smartgears/dataminer_app/templates/wps-config-fixer.j2: Set the provided hostname. --- smartgears/dataminer_app/templates/wps-config-fixer.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/smartgears/dataminer_app/templates/wps-config-fixer.j2 b/smartgears/dataminer_app/templates/wps-config-fixer.j2 index 1ef8dd1..a9b7cfe 100644 --- a/smartgears/dataminer_app/templates/wps-config-fixer.j2 +++ b/smartgears/dataminer_app/templates/wps-config-fixer.j2 @@ -4,7 +4,11 @@ WPS_CONFIG_FILE='{{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/config/wps_config.xml' # Fix the hostname +{% if hostname is defined %} +sed -Ei 's/hostname=\".*\"\ hostport/hostname="{{ hostname }}" hostport/' $WPS_CONFIG_FILE +{% else %} sed -Ei 's/hostname=\".*\"\ hostport/hostname="{{ smartgears_hostname }}" hostport/' $WPS_CONFIG_FILE +{% endif %} # Fix the port {%if setup_nginx %}