From a0a7f7d0075e4df2b777c9187be3e63aab6a832d Mon Sep 17 00:00:00 2001 From: SteBaum Date: Mon, 5 Aug 2024 11:58:15 +0200 Subject: [PATCH] refactor: remove JDBC connector install and put it in tdp-prerequisits --- roles/hive/metastore/tasks/install.yml | 9 ++------- roles/ranger/admin/tasks/install.yml | 5 ----- roles/ranger/kms/tasks/install.yml | 5 ----- tdp_vars_defaults/hive/hive.yml | 4 ++-- tdp_vars_defaults/ranger/ranger.yml | 3 --- 5 files changed, 4 insertions(+), 22 deletions(-) diff --git a/roles/hive/metastore/tasks/install.yml b/roles/hive/metastore/tasks/install.yml index 446b9d09..8eb514b2 100644 --- a/roles/hive/metastore/tasks/install.yml +++ b/roles/hive/metastore/tasks/install.yml @@ -7,15 +7,10 @@ name: tosit.tdp.hive.common tasks_from: install_hive -- name: Install jdbc connector - ansible.builtin.package: - name: "{{ hive_jdbc_connector_package }}" - state: present - - name: Create a symbolic link to jdbc.jar ansible.builtin.file: - src: /usr/share/java/{{ hive_jdbc_connector_package }}.jar - dest: "{{ hive_install_dir }}/lib/{{ hive_jdbc_connector_package }}.jar" + src: "{{ hive_jdbc_connector_path }}" + dest: "{{ hive_install_dir }}/lib/{{ hive_jdbc_connector_path | basename }}" state: link - name: Create configuration directory diff --git a/roles/ranger/admin/tasks/install.yml b/roles/ranger/admin/tasks/install.yml index 4946cc91..a6d06983 100644 --- a/roles/ranger/admin/tasks/install.yml +++ b/roles/ranger/admin/tasks/install.yml @@ -56,11 +56,6 @@ owner: root mode: "770" -- name: Install jdbc connector - ansible.builtin.package: - name: "{{ ranger_jdbc_connector_package }}" - state: present - - name: Template Ranger Admin service file ansible.builtin.template: src: ranger-admin.service.j2 diff --git a/roles/ranger/kms/tasks/install.yml b/roles/ranger/kms/tasks/install.yml index 425474eb..cc266ed6 100644 --- a/roles/ranger/kms/tasks/install.yml +++ b/roles/ranger/kms/tasks/install.yml @@ -79,11 +79,6 @@ owner: root mode: "770" -- name: Install jdbc connector - ansible.builtin.package: - name: "{{ ranger_jdbc_connector_package }}" - state: present - - name: Template Ranger KMS service file ansible.builtin.template: src: ranger-kms.service.j2 diff --git a/tdp_vars_defaults/hive/hive.yml b/tdp_vars_defaults/hive/hive.yml index 3e512b3a..a4fba766 100644 --- a/tdp_vars_defaults/hive/hive.yml +++ b/tdp_vars_defaults/hive/hive.yml @@ -44,8 +44,8 @@ hadoop_conf_dir: /etc/hadoop/conf java_home: /usr/lib/jvm/jre-1.8.0-openjdk hdfs_user: hdfs -# JDBC connector to be installed -hive_jdbc_connector_package: mysql-connector-java +# JDBC connector path +hive_jdbc_connector_path: /usr/share/java/mysql-connector-java.jar # Hive Metastore database properties hive_ms_db_url: jdbc:mysql://tdp-db-1.lxd:3306 diff --git a/tdp_vars_defaults/ranger/ranger.yml b/tdp_vars_defaults/ranger/ranger.yml index c1a853f8..0daa59cd 100644 --- a/tdp_vars_defaults/ranger/ranger.yml +++ b/tdp_vars_defaults/ranger/ranger.yml @@ -67,9 +67,6 @@ ranger_keystore_password: Keystore123! ranger_truststore_location: /etc/ssl/certs/truststore.jks ranger_truststore_password: Truststore123! -# JDBC connector to be installed -ranger_jdbc_connector_package: mysql-connector-java - # Ranger Admin install.properties install_properties: setup_mode: SeparateDBA