From 68ba0933f050cc50db8f41efa2783e50b62f38a3 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 12 Feb 2020 16:01:58 +0100 Subject: [PATCH] thredds: support the configuration of a google analytics id. --- library/roles/thredds/defaults/main.yml | 3 +++ library/roles/thredds/tasks/main.yml | 12 ++++++++++-- library/roles/thredds/templates/threddsConfig.xml.j2 | 8 ++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/library/roles/thredds/defaults/main.yml b/library/roles/thredds/defaults/main.yml index f4a7e818..cbc59172 100644 --- a/library/roles/thredds/defaults/main.yml +++ b/library/roles/thredds/defaults/main.yml @@ -20,3 +20,6 @@ thredds_host_institution_name: 'ORG' thredds_host_institution_web: '' thredds_force_ssl_for_user_data: False thredds_palettes_customisation: False +thredds_abstract: 'Scientific Data' +thredds_contact_name: 'Support' +thredds_google_analytics_key: '' \ No newline at end of file diff --git a/library/roles/thredds/tasks/main.yml b/library/roles/thredds/tasks/main.yml index 96cee4fc..d13ba15e 100644 --- a/library/roles/thredds/tasks/main.yml +++ b/library/roles/thredds/tasks/main.yml @@ -22,15 +22,23 @@ register: thredds_skip_conf tags: [ 'thredds', 'tomcat', 'thredds_conf' ] - - name: Install the Thredds data configuration files + - name: Install the Thredds data configuration files -only at initialization- template: src={{ item[1] }}.j2 dest={{ thredds_data_content_dir }}/thredds/{{ item[1] }} owner={{ item.0.user }} group={{ item.0.user }} mode=644 with_nested: - '{{ tomcat_m_instances }}' - - [ 'threddsConfig.xml', 'catalog.xml', 'wmsConfig.xml' ] + - ['catalog.xml', 'wmsConfig.xml' ] notify: tomcat instances restart when: not thredds_skip_conf.stat.exists tags: [ 'thredds', 'tomcat', 'thredds_conf' ] + - name: Install-update the Thredds data configuration files + template: src={{ item[1] }}.j2 dest={{ thredds_data_content_dir }}/thredds/{{ item[1] }} owner={{ item.0.user }} group={{ item.0.user }} mode=644 + with_nested: + - '{{ tomcat_m_instances }}' + - [ 'threddsConfig.xml'] + notify: tomcat instances restart + tags: [ 'thredds', 'tomcat', 'thredds_conf' ] + - name: Create the file that states that the thredds instance has been configured copy: content="initialized by ansible" dest={{ thredds_data_content_dir }}/thredds/.conf_initialized mode=0400 register: thredds_skip_conf diff --git a/library/roles/thredds/templates/threddsConfig.xml.j2 b/library/roles/thredds/templates/threddsConfig.xml.j2 index 5e282fec..79e14745 100644 --- a/library/roles/thredds/templates/threddsConfig.xml.j2 +++ b/library/roles/thredds/templates/threddsConfig.xml.j2 @@ -6,13 +6,13 @@ {{ thredds_server_name }} {{ thredds_logo_url }} - {{ thredds_server_name }} + {{ thredds_logo_alt_text }} - Scientific Data + {{ thredds_abstract }} meteorology, atmosphere, climate, ocean, earth science - Support + {{ thredds_contact_name}} {{ thredds_organization }} {{ thredds_email }} @@ -55,7 +55,7 @@ * webpages associated with THREDDS. This will not track WMS or DAP * requests for data, only browsing the catalog. --> - + {{ thredds_google_analytics_key }}