From 57c795a61de09c63e5451871e957842a208fcd05 Mon Sep 17 00:00:00 2001 From: khaledk2 Date: Sun, 13 Oct 2024 19:01:45 +0100 Subject: [PATCH] Update nginx configuration for ms after updating omero-web --- ansible/idr-omero-web.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ansible/idr-omero-web.yml b/ansible/idr-omero-web.yml index 30303f10..c9dff70a 100644 --- a/ansible/idr-omero-web.yml +++ b/ansible/idr-omero-web.yml @@ -10,3 +10,23 @@ # Vars are in group_vars/omero-hosts.yml environment: "{{ idr_ANSIBLE_ENVIRONMENT_VARIABLES | default({}) }}" + +# This bloock will run in case of updating omero-web +# It will check for the ms user exists +# If so, it will run the role to update the omero web nginx configuration file + +- hosts: "{{ idr_environment | default('idr') }}-omeroreadonly-hosts" + become: true + + pre_tasks: + - name: check if ms user exist + ansible.builtin.user: + name: "omero-server" + check_mode: true + register: service_user + + roles: + - role: ome.omero_ms_image_region + when: "{{ service_user.state | d('') == 'present' }}" + + environment: "{{ idr_ANSIBLE_ENVIRONMENT_VARIABLES | default({}) }}"