From e4ab2f9848c1eb686fb3cb341a220940c4858a28 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 26 Sep 2017 13:10:19 +0200 Subject: [PATCH] geonetwork: manage the config files in 3+ installations. --- geonetwork/geonetwork/defaults/main.yml | 3 + geonetwork/geonetwork/tasks/main.yml | 10 +- .../3.0-config-service-xml-api.xml.j2 | 173 ++++++++++++++++++ 3 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 geonetwork/geonetwork/templates/3.0-config-service-xml-api.xml.j2 diff --git a/geonetwork/geonetwork/defaults/main.yml b/geonetwork/geonetwork/defaults/main.yml index 0e2a4556..6e546c24 100644 --- a/geonetwork/geonetwork/defaults/main.yml +++ b/geonetwork/geonetwork/defaults/main.yml @@ -16,6 +16,9 @@ geonetwork_data_directory: /srv/geonetwork_data geonetwork_config_skipinfo: 'n' geonetwork_config_postgresql: True +geonetwork_config_files: + - config-service-xml-api.xml + # Only postgres and the embedded DB are supported # Values: postgres-postgis (3.2+ only), postgres (3.0 only), h2 # geonetwork_db_type: postgres-postgis diff --git a/geonetwork/geonetwork/tasks/main.yml b/geonetwork/geonetwork/tasks/main.yml index 3334e21e..d59f0d70 100644 --- a/geonetwork/geonetwork/tasks/main.yml +++ b/geonetwork/geonetwork/tasks/main.yml @@ -34,12 +34,20 @@ with_items: '{{ tomcat_m_instances }}' notify: tomcat instances restart - - name: Configure geonetwork using our template + - name: Configure geonetwork using our template, geonetwork version 2.x template: src=geonetwork_config.xml.j2 dest={{ item.instance_path }}/webapps/{{ geonetwork_app_name | lower }}/WEB-INF/config.xml owner={{ item.user }} group={{ item.user }} mode=0440 with_items: '{{ tomcat_m_instances }}' when: geonetwork_major_version < 3 notify: tomcat instances restart + - name: Configure geonetwork using our template, geonetwork version 3+ + template: src={{ geonetwork_major_version }}.{{ geonetwork_point_version }}-{{ item.1 }}.j2 dest={{ item.0.instance_path }}/webapps/{{ geonetwork_app_name | lower }}/WEB-INF/config/{{ item.1 }} owner={{ item.0.user }} group={{ item.0.user }} mode=0440 + with_items: + - '{{ tomcat_m_instances }}' + - '{{ geonetwork_config_files }}' + when: geonetwork_major_version >= 3 + notify: tomcat instances restart + - name: Set the geonetwork JDBC properties template: src=jdbc.properties.j2 dest={{ item.instance_path }}/webapps/{{ geonetwork_app_name | lower }}/WEB-INF/config-db/jdbc.properties owner={{ item.user }} group={{ item.user }} mode=0440 with_items: '{{ tomcat_m_instances }}' diff --git a/geonetwork/geonetwork/templates/3.0-config-service-xml-api.xml.j2 b/geonetwork/geonetwork/templates/3.0-config-service-xml-api.xml.j2 new file mode 100644 index 00000000..052c4448 --- /dev/null +++ b/geonetwork/geonetwork/templates/3.0-config-service-xml-api.xml.j2 @@ -0,0 +1,173 @@ + + + + XML API service are Jeeves services returning XML response. + At some point they may be deprecated and replaced by services used + by AngularUI returning XML or JSON response. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + transformation: Name of the template to use to return the keyword (eg. to-iso19139-with-anchor). + keywordOnly: Skip thesaurus citation section if defined (default no). + + + + + + + + + + Get list of available thesaurus + + + + + +