diff --git a/roles/repository/tasks/main.yml b/roles/repository/tasks/main.yml index 93a7f0aec..ebcca1164 100644 --- a/roles/repository/tasks/main.yml +++ b/roles/repository/tasks/main.yml @@ -11,17 +11,17 @@ - name: Set solr.sharedSecret property set_fact: - temp_array: '{{ temp_array }} + [ ''-Dsolr.sharedSecret="{{ reposearch_shared_secret }}"'' ]' + temp_array: "{{ temp_array + [ '-Dsolr.sharedSecret=' ~ reposearch_shared_secret | quote ] }}" when: acs.version is version('7.2.0', '>=') - name: Set metadata-keystore.password and related properties set_fact: - temp_array: '{{ temp_array }} + [ - ''-Dmetadata-keystore.password="{{ repo_custom_keystore_password }}"'', - ''-Dmetadata-keystore.aliases=metadata'', - ''-Dmetadata-keystore.metadata.password="{{ repo_custom_keystore_metadata_password }}"'', - ]' - when: repo_custom_keystore_password is defined and repo_custom_keystore_metadata_password + temp_array: "{{ temp_array + [ + '-Dmetadata-keystore.password=' ~ repo_custom_keystore_password | quote, + '-Dmetadata-keystore.aliases=metadata', + '-Dmetadata-keystore.metadata.password=' ~ repo_custom_keystore_metadata_password | quote + ] }}" + when: repo_custom_keystore_password is defined and repo_custom_keystore_metadata_password is defined - name: Combine secure acs environment set_fact: @@ -31,8 +31,8 @@ - name: Ensure a list of packages installed become: true - package: - name: "{{ utils_repo }} + {{ utils_storage[cs_storage.type | default('tmpfs')] }}" + ansible.builtin.package: + name: "{{ utils_repo + utils_storage[cs_storage.type | default('tmpfs')] }}" state: present - name: Create folders diff --git a/roles/search/molecule/default/tests/test_search.py b/roles/search/molecule/default/tests/test_search.py index f29177f0f..984dd73ce 100644 --- a/roles/search/molecule/default/tests/test_search.py +++ b/roles/search/molecule/default/tests/test_search.py @@ -41,7 +41,7 @@ def test_solr_stats_is_accessible(host): curl_opts = '-iL' search_env = host.ansible.get_variables() if version.parse(search_env['search']['version']) >= version.parse('2.0.3'): - curl_opts += ' -H "X-Alfresco-Search-Secret: alfresco"' + curl_opts += ' -H "X-Alfresco-Search-Secret: alfresco with space"' print("curl {} http://{}:8983/solr/#/~cores/alfresco".format(curl_opts, test_host)) alfresco_core_command = host.run("curl {} http://{}:8983/solr/#/~cores/alfresco".format(curl_opts, test_host)) archive_core_command = host.run("curl {} http://{}:8983/solr/#/~cores/archive".format(curl_opts, test_host)) diff --git a/roles/search/templates/solr.sh.j2 b/roles/search/templates/solr.sh.j2 index 71cafb4f1..b3d514ff4 100644 --- a/roles/search/templates/solr.sh.j2 +++ b/roles/search/templates/solr.sh.j2 @@ -5,7 +5,7 @@ if [ $(id -u) -eq 0 ]; then fi . {{ config_folder }}/setenv.sh {% if acs.version is version('7.2.0', '>=') -%} -export JAVA_TOOL_OPTIONS="-Dalfresco.secureComms.secret={{ reposearch_shared_secret }}" +export JAVA_TOOL_OPTIONS="-Dalfresco.secureComms.secret={{ reposearch_shared_secret | quote }}" {% endif %} export SOLR_INCLUDE={{ config_dir }}/solr.in.sh {{ binaries_dir }}/solr/bin/solr $* diff --git a/tests/molecule/secrets.yml b/tests/molecule/secrets.yml index f76ed7c8e..a2209aa56 100644 --- a/tests/molecule/secrets.yml +++ b/tests/molecule/secrets.yml @@ -1,5 +1,5 @@ repo_db_password: alfresco sync_db_password: alfresco -reposearch_shared_secret: alfresco +reposearch_shared_secret: alfresco with space activemq_username: admin activemq_password: admin \ No newline at end of file