diff --git a/defaults/main.yml b/defaults/main.yml index 5cf3f66..fcf54b2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -53,3 +53,8 @@ omero_ms_image_region_download_URL: 'https://github.com/khaledk2/ice-archh-64/re omero_ms_image_region_ms_sha256: f984bb78fa81d4fa603387df919d383485944a15a6a762f5c136cf35aefafeaa omero_ms_image_region_ms_name: "{{ omero_ms_image_region_download_URL | basename }}" + +omero_ms_image_region_ms_redis_url: 'localhost' +omero_ms_image_region_ms_redis_port: '6379' +omero_ms_image_region_ms_redis_username: '' +omero_ms_image_region_ms_redis_user_pass: '' diff --git a/tasks/main.yml b/tasks/main.yml index 9b628d3..d32fd3d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -27,6 +27,19 @@ - stat_ssh256.stat.checksum is undefined or omero_ms_image_region_ms_sha256 != stat_ssh256.stat.checksum - not stat_result.stat.exists +- name: omero-ms-image-region | set redis url in protected mode + ansible.builtin.set_fact: + omero_ms_image_region_ms_redis_uri: + "redis://:@'{{ omero_ms_image_region_ms_redis_url }}':omero_ms_image_region_ms_redis_port/0" + when: omero_ms_image_region_ms_redis_username and omero_ms_image_region_ms_redis_user_pass + +- name: omero-ms-image-region | set redis uri in not protected mode + ansible.builtin.set_fact: + omero_ms_image_region_ms_redis_uri: + "redis://'{{ omero_ms_image_region_ms_redis_username }}':'{{ omero_ms_image_region_ms_redis_user_pass }}'@'{{ omero_ms_image_region_ms_redis_url }}':omero_ms_image_region_ms_redis_port/0" + when: not omero_ms_image_region_ms_redis_username and not omero_ms_image_region_ms_redis_user_pass + + - name: omero-ms-image-region | copy config file become: true become_user: "{{ omero_ms_image_region_user }}" diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index c39958d..e5d0417 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -18,10 +18,10 @@ omero: omero.server: omero.data.dir: "{{ omero_data_dir }}" omero.db.host: "{{ omero_ms_image_region_db_url }}" - omero.db.name: "{{ omero_ms_image_region_db_name }}" - omero.db.port: "{{ omero_ms_image_region_db_port }}" - omero.db.user: "{{ omero_ms_image_region_db_username }}" - omero.db.pass: "{{ omero_ms_image_region_db_pass }}" + omero.db.name: "{{ db_name }}" + omero.db.port: "{{ db_port }}" + omero.db.user: "{{ db_user_name }}" + omero.db.pass: "{{ db_pass }}" # OMERO_HOME/lib/scripts omero.script_repo_root: "{{ omero_script_repo_root }}" omero.pixeldata.max_tile_length: "2048" @@ -38,7 +38,7 @@ omero.web: # Size of the worker pool (defaults to CPUs x 2) -omero_ms_image_region_ms_worker_pool_size: {{ omero_ms_image_region_ms_worker_pool_size }} +worker_pool_size: {{ worker_pool_size }} # # Configuration for zipkin http tracing http-tracing: @@ -63,10 +63,7 @@ session-store: # * https://jdbc.postgresql.org/documentation/80/connect.html # * https://github.com/lettuce-io/lettuce-core/wiki/Redis-URI-and-connection-details # uri: "jdbc:postgresql://localhost:5432/omero_database?user=omero&password=omero" - # For Redis in protected mode - uri: "redis://:@localhost:6379/0" - # For Redis in non-protected mode - # uri: "redis://:password@localhost:6379/0" + uri: "{{ omero_ms_image_region_ms_redis_uri }}" redis-cache: #uri: "redis://cf33da71-d81f-42e3-9932-71c82d52de32@localhost:6379/1"