From f2481cb6cf992f923b85498ec2ef9925b606f8c7 Mon Sep 17 00:00:00 2001 From: Julien Georges Date: Thu, 4 Jul 2024 16:01:03 +0200 Subject: [PATCH] Story #11854: Small OPS Cleanup. * Remove unexisting inventory group. * Add gather_facts as we need to define the ansible_distribution. * Update useless double if in mongo scripts. --- deployment/ansible-vitamui-extra/vitamui_extra.yml | 2 +- deployment/environments/hosts-ui.example | 4 ---- deployment/environments/hosts.local | 5 ----- .../scripts/mongod/1.0.0/318_application_ref.js.j2 | 7 ++----- .../07_insert_serviceid_to_applications_ref.js | 13 ------------- ...0_logbook_operation_management_application.js.j2 | 7 ++----- ...create_application_MANAGEMENT_CONTRACT_APP.js.j2 | 7 ++----- 7 files changed, 7 insertions(+), 38 deletions(-) diff --git a/deployment/ansible-vitamui-extra/vitamui_extra.yml b/deployment/ansible-vitamui-extra/vitamui_extra.yml index 847b6901f72..166bbf90417 100644 --- a/deployment/ansible-vitamui-extra/vitamui_extra.yml +++ b/deployment/ansible-vitamui-extra/vitamui_extra.yml @@ -19,6 +19,6 @@ - browser - hosts: reverse - gather_facts: no + gather_facts: yes roles: - merge_index_apache diff --git a/deployment/environments/hosts-ui.example b/deployment/environments/hosts-ui.example index b0b2f37e861..f1d5dc424bf 100644 --- a/deployment/environments/hosts-ui.example +++ b/deployment/environments/hosts-ui.example @@ -31,7 +31,6 @@ hosts_vitamui_reverseproxy [zone_vitamui_ui:children] hosts_ui_identity hosts_ui_portal -hosts_ui_search hosts_ui_ingest hosts_ui_archive_search hosts_ui_collect @@ -57,9 +56,6 @@ hosts_ui_design_system [hosts_ui_portal] # EDIT: Mandatory -[hosts_ui_search] -# EDIT: Mandatory - [hosts_ui_pastis] # EDIT: Mandatory diff --git a/deployment/environments/hosts.local b/deployment/environments/hosts.local index bd777187547..c760bdb5f0c 100644 --- a/deployment/environments/hosts.local +++ b/deployment/environments/hosts.local @@ -32,7 +32,6 @@ localhost [zone_vitamui_ui:children] hosts_ui_identity hosts_ui_portal -hosts_ui_search hosts_ui_ingest hosts_ui_archive_search hosts_ui_collect @@ -64,10 +63,6 @@ localhost # EDIT: Mandatory localhost -[hosts_ui_search] -# EDIT: Mandatory -localhost - [hosts_ui_pastis] # EDIT: Mandatory localhost diff --git a/deployment/scripts/mongod/1.0.0/318_application_ref.js.j2 b/deployment/scripts/mongod/1.0.0/318_application_ref.js.j2 index 5da5e9654b5..9a40f6a901c 100644 --- a/deployment/scripts/mongod/1.0.0/318_application_ref.js.j2 +++ b/deployment/scripts/mongod/1.0.0/318_application_ref.js.j2 @@ -8,8 +8,10 @@ db.applications.insertOne({ "identifier" : "ACCESSION_REGISTER_APP", {% if vitamui.referential.base_url is defined %} "url": "{{ vitamui.referential.base_url }}/accession-register", + "serviceId": "^{{ vitamui.referential.base_url }}/.*" {% else %} "url": "{{ url_prefix }}/referential/accession-register", + "serviceId": "^{{ url_prefix }}/referential/.*" {% endif %} "icon" : "vitamui-icon vitamui-icon-rules", "name" : "Registre des fonds", @@ -20,11 +22,6 @@ db.applications.insertOne({ "hasHighlight" : false, "tooltip" : "Visualisation de l'ensemble des données du registre des fonds", "target" : "_self", - {% if vitamui.referential.base_url is defined %} - "serviceId": "^{{ vitamui.referential.base_url }}/.*" - {% else %} - "serviceId": "^{{ url_prefix }}/referential/.*" - {% endif %} }); print("END 318_application_ref.js"); diff --git a/deployment/scripts/mongod/2.0.0/07_insert_serviceid_to_applications_ref.js b/deployment/scripts/mongod/2.0.0/07_insert_serviceid_to_applications_ref.js index bfc03cca76f..13bac761a9d 100644 --- a/deployment/scripts/mongod/2.0.0/07_insert_serviceid_to_applications_ref.js +++ b/deployment/scripts/mongod/2.0.0/07_insert_serviceid_to_applications_ref.js @@ -4,19 +4,6 @@ print("Start 07_insert_serviceid_to_applications_ref.js"); // =============== INGEST ========== -db.applications.updateOne({ - "identifier" : "INGEST_MANAGEMENT_APP" -}, { - $set: { - {% if vitamui.ingest.base_url is defined %} - "serviceId2": "^{{ vitamui.ingest.base_url }}/.*", - {% else %} - "serviceId2": "^{{ url_prefix }}/ingest/.*", - {% endif %} - }, - } -); - db.applications.updateOne({ "identifier" : "HOLDING_FILLING_SCHEME_APP", }, { diff --git a/deployment/scripts/mongod/2.0.0/20_logbook_operation_management_application.js.j2 b/deployment/scripts/mongod/2.0.0/20_logbook_operation_management_application.js.j2 index cb6f7018299..8d1453ca86b 100644 --- a/deployment/scripts/mongod/2.0.0/20_logbook_operation_management_application.js.j2 +++ b/deployment/scripts/mongod/2.0.0/20_logbook_operation_management_application.js.j2 @@ -8,13 +8,10 @@ db.applications.insertOne({ "identifier" : "LOGBOOK_MANAGEMENT_OPERATION_APP", {% if vitamui.referential.base_url is defined %} "url": "{{ vitamui.referential.base_url }}/logbook-management-operation", + "serviceId": "^{{ vitamui.referential.base_url }}/.*", {% else %} "url": "{{ url_prefix }}/referential/logbook-management-operation", -{% endif %} -{% if vitamui.referential.base_url is defined %} - "serviceId": "^{{ vitamui.referential.base_url }}/.*", -{% else %} - "serviceId": "^{{ url_prefix }}/referential/.*", + "serviceId": "^{{ url_prefix }}/referential/.*", {% endif %} "icon": "vitamui-icon vitamui-icon-logbook-operations", "name": "Gestion des Opérations", diff --git a/deployment/scripts/mongod/v6.0/22_create_application_MANAGEMENT_CONTRACT_APP.js.j2 b/deployment/scripts/mongod/v6.0/22_create_application_MANAGEMENT_CONTRACT_APP.js.j2 index 7c8f1b0b81b..7709d120587 100644 --- a/deployment/scripts/mongod/v6.0/22_create_application_MANAGEMENT_CONTRACT_APP.js.j2 +++ b/deployment/scripts/mongod/v6.0/22_create_application_MANAGEMENT_CONTRACT_APP.js.j2 @@ -8,13 +8,10 @@ db.applications.insertOne({ "identifier" : "MANAGEMENT_CONTRACT_APP", {% if vitamui.referential.base_url is defined %} "url": "{{ vitamui.referential.base_url }}/management-contract", -{% else %} - "url": "{{ url_prefix }}/referential/management-contract", -{% endif %} -{% if vitamui.referential.base_url is defined %} "serviceId": "^{{ vitamui.referential.base_url }}/.*", {% else %} - "serviceId": "^{{ url_prefix }}/referential/.*", + "url": "{{ url_prefix }}/referential/management-contract", + "serviceId": "^{{ url_prefix }}/referential/.*", {% endif %} "icon" : "vitamui-icon vitamui-icon-ontologie", "name" : "Contrats de Gestion",