diff --git a/smartgears/smartgears/defaults/main.yml b/smartgears/smartgears/defaults/main.yml index 1c95bf6f..36ccb2f2 100644 --- a/smartgears/smartgears/defaults/main.yml +++ b/smartgears/smartgears/defaults/main.yml @@ -31,7 +31,6 @@ smartgears_location: pisa smartgears_latitude: 41.9000 smartgears_longitude: 12.5000 - smartgears_http_port: 9000 smartgears_service_name: 'tomcat-instance-{{ smartgears_http_port }}' @@ -39,21 +38,14 @@ smartgears_loglevel: WARN smartgears_tomcat_contexts: [ 'whn-manager' ] smartgears_define_context_vo: False -smartgears_define_context_root_vo: True -smartgears_context: '/smart-executor' -smartgears_contexts_list: - - '' - - '/BiodiversityLab' - - '/BiOnym' - - '/ScalableDataMining' - -# dev has two different contexts -#smart_executor_contexts_list: -# - '' -# - '/devVRE' - -# - '' -# - '/NextNext' +smartgears_define_context_root_vo: False +smartgears_context: + - name: '/smart-executor' + scopes: + - '' + - '/BiodiversityLab' + - '/BiOnym' + - '/ScalableDataMining' # The iptables rules use this http_port: '{{ smartgears_http_port }}' diff --git a/smartgears/smartgears/templates/container.xml.j2 b/smartgears/smartgears/templates/container.xml.j2 index bf11a163..ee1649e6 100644 --- a/smartgears/smartgears/templates/container.xml.j2 +++ b/smartgears/smartgears/templates/container.xml.j2 @@ -1,48 +1,45 @@ {{ smartgears_hostname }} -{%if setup_nginx %} -{%if https_port is defined %} - {{ https_port }} -{% else %} - {{ http_port }} -{% endif %} -{% else %} - {{ item.http_port }} -{% endif %} - {{ smartgears_infrastructure_name }} - - {% if smartgears_vo %} - {% for vo_n in smartgears_vo_name %} - {{ vo_n }} - {% endfor %} - {% endif %} + {%if setup_nginx %} + {%if https_port is defined %} + {{ https_port }} + {% else %} + {{ http_port }} + {% endif %} + {% else %} + {{ item.http_port }} + {% endif %} + {{ smartgears_infrastructure_name }} + {% if smartgears_vo %} + {% for vo_n in smartgears_vo_name %} + {{ vo_n }} + {% endfor %} + {% endif %} - - {{ smartgears_country }} - {{ smartgears_location }} - {{ smartgears_latitude }} - {{ smartgears_longitude }} - + + {{ smartgears_country }} + {{ smartgears_location }} + {{ smartgears_latitude }} + {{ smartgears_longitude }} + - - - 60 - -{% if smartgears_define_context_vo %} - + + + 60 + {% if smartgears_define_context_vo %} + {% for context in smartgears_context %} + {% if smartgears_define_context_root_vo %} /{{ smartgears_infrastructure_name }} {% endif %} - {% for vo_n in smartgears_vo_name %} - {% for context in smartgears_contexts_list %} - /{{ smartgears_infrastructure_name }}/{{ vo_n }}{{ context }} + {% for vo_scope in context.scopes %} + /{{ smartgears_infrastructure_name }}/{{ vo_n }}{{ vo_scope }} {% endfor %} {% endfor %} - - -{% endif %} + {% endfor %} + {% endif %}