diff --git a/thredds/defaults/main.yml b/thredds/defaults/main.yml
index 8a6d9485..f4a7e818 100644
--- a/thredds/defaults/main.yml
+++ b/thredds/defaults/main.yml
@@ -19,3 +19,4 @@ thredds_email: ''
thredds_host_institution_name: 'ORG'
thredds_host_institution_web: ''
thredds_force_ssl_for_user_data: False
+thredds_palettes_customisation: False
diff --git a/thredds/files/customPalettes.tar.gz b/thredds/files/customPalettes.tar.gz
new file mode 100644
index 00000000..ef379e00
Binary files /dev/null and b/thredds/files/customPalettes.tar.gz differ
diff --git a/thredds/tasks/main.yml b/thredds/tasks/main.yml
index e9cc52fb..a10a1a64 100644
--- a/thredds/tasks/main.yml
+++ b/thredds/tasks/main.yml
@@ -26,7 +26,7 @@
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']
+ - [ 'threddsConfig.xml', 'catalog.xml', 'wmsConfig.xml' ]
notify: tomcat instances restart
when: not thredds_skip_conf.stat.exists
tags: [ 'thredds', 'tomcat', 'thredds_conf' ]
@@ -36,6 +36,21 @@
register: thredds_skip_conf
tags: [ 'thredds', 'tomcat', 'thredds_conf' ]
+ - name: Create the custom palettes directory
+ file: dest={{ thredds_data_content_dir }}/thredds/customPalettes state=directory owner={{ item.user }} group={{ item.user }}
+ when: thredds_palettes_customisation
+ with_items: '{{ tomcat_m_instances }}'
+ tags: [ 'thredds', 'tomcat', 'thredds_custom_palettes' ]
+
+ - name: Install the custom palettes
+ unarchive: src=customPalettes.tar.gz dest={{ thredds_data_content_dir }}/thredds/customPalettes/ remote_src=no owner={{ item.user }} group={{ item.user }}
+ args:
+ creates: '{{ thredds_data_content_dir }}/thredds/customPalettes/occam.pal'
+ with_items: '{{ tomcat_m_instances }}'
+ notify: tomcat instances restart
+ when: thredds_palettes_customisation
+ tags: [ 'thredds', 'tomcat', 'thredds_custom_palettes' ]
+
- name: Get the thredds war file
maven_artifact: artifact_id={{ thredds_name }} version={{ thredds_version | default(omit) }} group_id={{ thredds_group_id }} extension={{ thredds_extension | default('war') }} repository_url={{ thredds_repository_url }} dest={{ thredds_download_directory }}/{{ thredds_file }}
diff --git a/thredds/templates/threddsConfig.xml.j2 b/thredds/templates/threddsConfig.xml.j2
index 2001d53a..5e282fec 100644
--- a/thredds/templates/threddsConfig.xml.j2
+++ b/thredds/templates/threddsConfig.xml.j2
@@ -200,6 +200,9 @@
false
2048
2048
+ {% if thredds_palettes_customisation %}
+ customPalettes
+ {% endif %}
diff --git a/thredds/templates/wmsConfig.xml.j2 b/thredds/templates/wmsConfig.xml.j2
new file mode 100644
index 00000000..5b94dfbf
--- /dev/null
+++ b/thredds/templates/wmsConfig.xml.j2
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]>
+
+
+
+
+
+
+
+ true
+ -50 50
+ rainbow
+ 20
+ false
+
+
+
+
+
+
+ 268 308
+
+
+ 268 308
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ occam
+
+
+
+
+
+ 10 20
+
+
+
+
+ {% if thredds_palettes_customisation %}
+
+
+ 0 1
+ aquamaps
+ 5
+
+
+ {% endif %}
+
+
+
+