diff --git a/ansible/group_vars/omeroreadonly-hosts.yml b/ansible/group_vars/omeroreadonly-hosts.yml index 4e006893..d4e23859 100644 --- a/ansible/group_vars/omeroreadonly-hosts.yml +++ b/ansible/group_vars/omeroreadonly-hosts.yml @@ -11,3 +11,13 @@ idr_omero_web_user_dropdown: false # Set this to 'ro' to mount /data/BioFormatsCache on read-only servers as # read-only, default is 'rw' # idr_bioformatscache_readwrite: + +# MS variables + +omero_ms_image_region_update_nginx: true +omero_ms_image_region_db_url: {{ omero_db_host_ansible }} +omero_ms_image_region_db_name: idr +omero_ms_image_region_db_username: omeroreadonly +omero_ms_image_region_db_pass: {{ omero_server_dbpassword }} +omero_data_dir: /data/OMERO +omero_ms_image_region_session_id: sessionid_{{ idr_environment | default('idr') }} diff --git a/ansible/idr-ms-image-region.yml b/ansible/idr-ms-image-region.yml deleted file mode 100644 index 814a4250..00000000 --- a/ansible/idr-ms-image-region.yml +++ /dev/null @@ -1,23 +0,0 @@ -- hosts: "{{ idr_environment | default('idr') }}-omeroreadonly-hosts" - become: true - - pre_tasks: - - name: get database host - set_fact: - database_server_url: >- - {{ - hostvars[groups[idr_environment | default('idr') + '-database-hosts'][0]] - ['ansible_' + (idr_net_iface | default('eth0'))]['ipv4']['address'] - }} - - name: get database password - set_fact: >- - database_user_password: "{{ idr_secret_postgresql_password_ro | default('omero') }}" - roles: - - role: ome.omero_ms_image_region - omero_ms_image_region_update_nginx: true - omero_ms_image_region_db_url: {{ datab ase_server_url }} - omero_ms_image_region_db_name: idr - omero_ms_image_region_db_username: omeroreadonly - omero_ms_image_region_db_pass: {{ database_user_password }} - omero_data_dir: /data/OMERO - omero_ms_image_region_session_id: sessionid_{{ idr_environment | default('idr') }} diff --git a/ansible/idr-omero-readonly.yml b/ansible/idr-omero-readonly.yml index fa5ef299..a657e922 100644 --- a/ansible/idr-omero-readonly.yml +++ b/ansible/idr-omero-readonly.yml @@ -229,3 +229,15 @@ path: "{{ omero_common_basedir }}/server/OMERO.server/lib/scripts/omero" state: absent notify: restart omero-server + +# deploy ms +# This will modify the omero web nginx configuration file +# It should be executed after running idr-omero-web.yml +# as it is in idr-01-install-idr.yml +- hosts: "{{ idr_environment | default('idr') }}-omeroreadonly-hosts" + become: true + + roles: + - role: ome.omero_ms_image_region + + environment: "{{ idr_ANSIBLE_ENVIRONMENT_VARIABLES | default({}) }}"