From 41a889110a65c57a2c968e1358b6b463572e0d2d Mon Sep 17 00:00:00 2001 From: Bart Geesink Date: Tue, 9 Jul 2024 19:53:19 +0200 Subject: [PATCH] Rename mysql_host to mariadb_host so it is the same for all apps and environments --- environments/template/group_vars/template.yml | 15 +++++++++------ environments/template/secrets/skeleton.yml | 7 ------- environments/vm/group_vars/vm.yml | 14 ++++++++++---- environments/vm/secrets/vm.yml | 8 -------- roles/diyidp/defaults/main.yml | 2 +- roles/mysql/tasks/main.yml | 4 ++-- 6 files changed, 22 insertions(+), 28 deletions(-) diff --git a/environments/template/group_vars/template.yml b/environments/template/group_vars/template.yml index c6feaefd9..3478dce5c 100644 --- a/environments/template/group_vars/template.yml +++ b/environments/template/group_vars/template.yml @@ -1,5 +1,8 @@ --- env: "%env%" +mariadb_host: localhost +rsyslog_host: localhost +database_clients: [ "{{ mariadb_host }}" ] use_selfsigned_certs: true update_hosts_file: true use_welcome_role: true @@ -207,7 +210,7 @@ springboot_server_services: guest_qualifier: "urn:collab:org:{{ base_domain }}" engine_database_name: eb -engine_database_host: "{{ mysql_host }}" +engine_database_host: "{{ mariadb_host }}" engine_database_port: 3306 engine_database_user: ebrw engine_database_password: "{{ mysql_passwords.eb }}" @@ -254,14 +257,14 @@ shibboleth_apps: baseurl: "" shib: - db_host: "{{ mysql_host }}" + db_host: "{{ mariadb_host }}" shibboleth_database_backend: false teams: db_name: "teams" db_user: "teamsrw" db_password: "{{ mysql_passwords.teams }}" - db_host: "{{ mysql_host }}" + db_host: "{{ mariadb_host }}" group_name_context: "urn:collab:group:{{ base_domain }}:" voot_api_user: "voot" spdashboard_api_user: "spdashboard" @@ -330,7 +333,7 @@ pdp: password: "{{ pdp_password }}" db_user: pdp-serverrw db_password: "{{ mysql_passwords.pdp_server }}" - db_host: "{{ mysql_host }}" + db_host: "{{ mariadb_host }}" db_name: pdp-server spring_profiles_active: test cache_policies: false @@ -345,7 +348,7 @@ aa: eb_password: "{{ aa_eb_password }}" db_user: aa-serverrw db_password: "{{ mysql_passwords.aa_server }}" - db_host: "{{ mysql_host }}" + db_host: "{{ mariadb_host }}" db_name: aaserver authz_client_id: "aa.{{base_domain}}" authz_resource_server_id: aa @@ -447,7 +450,7 @@ manage: eb_db_user: "{{ engine_database_user }}" eb_db_password: "{{ mysql_passwords.eb }}" eb_db_name: "{{ engine_database_name }}" - eb_db_host: "{{ mysql_host }}" + eb_db_host: "{{ mariadb_host }}" mongo_port: "{{ mongo_port }}" mongo_user: managerw mongo_password: "{{ mongo_passwords.manage }}" diff --git a/environments/template/secrets/skeleton.yml b/environments/template/secrets/skeleton.yml index 432d8b485..5a68f80bb 100644 --- a/environments/template/secrets/skeleton.yml +++ b/environments/template/secrets/skeleton.yml @@ -1,10 +1,3 @@ -env: "%env%" - -mysql_host: localhost -rsyslog_host: localhost - -database_clients: [ "{{ mysql_host }}" ] - mysql_root_password: secret mysql_passwords: diff --git a/environments/vm/group_vars/vm.yml b/environments/vm/group_vars/vm.yml index 811596013..fa884bb2d 100644 --- a/environments/vm/group_vars/vm.yml +++ b/environments/vm/group_vars/vm.yml @@ -1,5 +1,11 @@ --- env: vm + +base_domain: "{{ env }}.openconext.org" + +rsyslog_host: localhost +mariadb_host: localhost +database_clients: [ "{{ mariadb_host }}" ] use_selfsigned_certs: true update_hosts_file: true use_welcome_role: true @@ -150,7 +156,7 @@ teams: db_name: "teams" db_user: "teamsrw" db_password: "{{ mysql_passwords.teams }}" - db_host: "{{ mysql_host }}" + db_host: "{{ mariadb_host }}" group_name_context: "urn:collab:group:{{ base_domain }}:" voot_api_user: "voot" spdashboard_api_user: "spdashboard" @@ -221,7 +227,7 @@ pdp: password: "{{ pdp_password }}" db_user: pdp-serverrw db_password: "{{ mysql_passwords.pdp_server }}" - db_host: "{{ mysql_host }}" + db_host: "{{ mariadb_host }}" db_name: pdp-server spring_profiles_active: test cache_policies: false @@ -235,7 +241,7 @@ aa: eb_password: "{{ aa_eb_password }}" db_user: aa-serverrw db_password: "{{ mysql_passwords.aa_server }}" - db_host: "{{ mysql_host }}" + db_host: "{{ mariadb_host }}" db_name: aaserver authz_client_id: "aa.{{ base_domain }}" authz_resource_server_id: aa @@ -334,7 +340,7 @@ manage: eb_db_user: "{{ engine_database_user }}" eb_db_password: "{{ mysql_passwords.eb }}" eb_db_name: "{{ engine_database_name }}" - eb_db_host: "{{ mysql_host }}" + eb_db_host: "{{ mariadb_host }}" mongo_port: "{{ mongo_port }}" mongo_user: "{{ manage_mongo_user }}" mongo_password: "{{ mongo_passwords.manage }}" diff --git a/environments/vm/secrets/vm.yml b/environments/vm/secrets/vm.yml index b05b74a7f..566ee0718 100644 --- a/environments/vm/secrets/vm.yml +++ b/environments/vm/secrets/vm.yml @@ -1,11 +1,3 @@ -env: vm -base_domain: "{{ env }}.openconext.org" - -mysql_host: localhost -rsyslog_host: localhost - -database_clients: [ "{{ mysql_host }}" ] - mysql_root_password: secret galera_clustercheck_password: secret diff --git a/roles/diyidp/defaults/main.yml b/roles/diyidp/defaults/main.yml index a8dd6b24e..5fe652520 100644 --- a/roles/diyidp/defaults/main.yml +++ b/roles/diyidp/defaults/main.yml @@ -2,7 +2,7 @@ diyidp_domain: "diyidp.{{ base_domain }}" diyidp_cert: "diyidp.crt" diyidp: - db_host: "{{ mysql_host }}" + db_host: "{{ mariadb_host }}" db_name: diyidp db_user: diyidprw db_password: "{{ mysql_passwords.diyidp }}" diff --git a/roles/mysql/tasks/main.yml b/roles/mysql/tasks/main.yml index 52b37f35b..0f9eb3e05 100644 --- a/roles/mysql/tasks/main.yml +++ b/roles/mysql/tasks/main.yml @@ -47,7 +47,7 @@ user: "" state: absent login_user: root - host: "{{ mysql_host }}" + host: "{{ mariadb_host }}" login_password: "{{ mysql_root_password }}" tags: - mysql @@ -57,7 +57,7 @@ user: "" state: absent login_user: root - host: "{{ mysql_host }}" + host: "{{ mariadb_host }}" login_password: "{{ mysql_root_password }}" tags: - mysql