From 72a1d67dfd4fdfde4d02923ed1fa2ba32a614b64 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Wed, 4 Sep 2024 13:37:03 -0400 Subject: [PATCH 01/10] Rename default.yml to main.yml and add missing TLS parameters Signed-off-by: Webster Mudge --- roles/rdbms/server/defaults/{defaults.yml => main.yml} | 2 ++ 1 file changed, 2 insertions(+) rename roles/rdbms/server/defaults/{defaults.yml => main.yml} (94%) diff --git a/roles/rdbms/server/defaults/defaults.yml b/roles/rdbms/server/defaults/main.yml similarity index 94% rename from roles/rdbms/server/defaults/defaults.yml rename to roles/rdbms/server/defaults/main.yml index 1487c8e2..b0cbf585 100644 --- a/roles/rdbms/server/defaults/defaults.yml +++ b/roles/rdbms/server/defaults/main.yml @@ -29,4 +29,6 @@ base_dir_security_pki: "{{ base_dir_security }}/pki" tls_chain_path: "{{ base_dir_security_pki }}/chain.pem" tls_cert_path_generic: "{{ base_dir_security_pki }}/host.pem" + +tls_key_path_generic: "{{ base_dir_security_pki }}/host.key" tls_key_path_plaintext_generic: "{{ tls_key_path_generic }}.unenc" From a6f2a6cadfa5ce80654983ef66097831c55ca63f Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Wed, 4 Sep 2024 13:37:46 -0400 Subject: [PATCH 02/10] Update tempdir for postgres user access Signed-off-by: Webster Mudge --- roles/rdbms/server/files/utf8-template.sql | 2 +- roles/rdbms/server/tasks/postgresql/template_fix.yml | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/roles/rdbms/server/files/utf8-template.sql b/roles/rdbms/server/files/utf8-template.sql index 31feb483..7fc16312 100644 --- a/roles/rdbms/server/files/utf8-template.sql +++ b/roles/rdbms/server/files/utf8-template.sql @@ -1,4 +1,4 @@ --- Copyright 2021 Cloudera, Inc. +-- Copyright 2024 Cloudera, Inc. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. diff --git a/roles/rdbms/server/tasks/postgresql/template_fix.yml b/roles/rdbms/server/tasks/postgresql/template_fix.yml index deb49cd1..801e3148 100644 --- a/roles/rdbms/server/tasks/postgresql/template_fix.yml +++ b/roles/rdbms/server/tasks/postgresql/template_fix.yml @@ -15,13 +15,19 @@ - name: Create a temporary SQL directory ansible.builtin.tempfile: state: directory - suffix: sql + suffix: "-sql" register: __sql +- name: Allow allow access for the postgres user + ansible.builtin.file: + path: "{{ __sql.path }}" + owner: postgres + group: postgres + - name: Copy SQL to change template to UTF-8 ansible.builtin.copy: src: files/utf8-template.sql - dest: "{{ __sql.path }}" + dest: "{{ __sql.path }}/utf8-template.sql" owner: postgres group: postgres mode: 0660 @@ -36,4 +42,3 @@ path: "{{ __sql.path }}" state: absent become: yes - become_user: postgres From 34450ff86d891c8f3d3ae2ce53123c21a7821102 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Wed, 4 Sep 2024 13:39:31 -0400 Subject: [PATCH 03/10] Add failed_when conditional for missing postgresql module stream for RHEL 8 or greater Signed-off-by: Webster Mudge --- roles/rdbms/server/tasks/postgresql/RedHat.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/rdbms/server/tasks/postgresql/RedHat.yml b/roles/rdbms/server/tasks/postgresql/RedHat.yml index 0b68db97..404d96a6 100644 --- a/roles/rdbms/server/tasks/postgresql/RedHat.yml +++ b/roles/rdbms/server/tasks/postgresql/RedHat.yml @@ -28,11 +28,13 @@ gpgkey: https://download.postgresql.org/pub/repos/yum/keys/PGDG-RPM-GPG-KEY-RHEL when: not skip_rdbms_repo_setup -- name: Disable default Postgres module in RHEL 8 +- name: Disable default Postgres module in RHEL 8 or greater ansible.builtin.command: dnf module disable -y postgresql register: __postgres_module_result changed_when: - '"Disabling modules" in __postgres_module_result.stdout' + failed_when: + - __postgres_module_result.rc != 0 and __postgres_module_result.rc != 1 when: - ansible_os_family == 'RedHat' - ansible_distribution_major_version | int >= 8 From 72a9a80b12e6b42f2200a6eac1a119d8c10de3a7 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 5 Sep 2024 22:53:09 -0400 Subject: [PATCH 04/10] Update PostgreSQL repository and key tasks Signed-off-by: Webster Mudge --- roles/rdbms/server/tasks/postgresql/Debian.yml | 11 ++++++++--- roles/rdbms/server/tasks/postgresql/template_fix.yml | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/roles/rdbms/server/tasks/postgresql/Debian.yml b/roles/rdbms/server/tasks/postgresql/Debian.yml index d82506c5..5bdca9d7 100644 --- a/roles/rdbms/server/tasks/postgresql/Debian.yml +++ b/roles/rdbms/server/tasks/postgresql/Debian.yml @@ -12,15 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Install keyrings directory + ansible.builtin.file: + path: /etc/apt/keyrings + state: directory + - name: Install PostgreSQL repository key - ansible.builtin.apt_key: + ansible.builtin.get_url: url: https://www.postgresql.org/media/keys/ACCC4CF8.asc - state: present + dest: /etc/apt/keyrings/postgresql.asc when: not skip_rdbms_repo_setup - name: Install PostgreSQL repository ansible.builtin.apt_repository: - repo: "deb https://apt.postgresql.org/pub/repos/apt {{ ansible_distribution_release }}-pgdg main" + repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/postgresql.asc] https://apt.postgresql.org/pub/repos/apt {{ ansible_distribution_release }}-pgdg main" state: present when: not skip_rdbms_repo_setup diff --git a/roles/rdbms/server/tasks/postgresql/template_fix.yml b/roles/rdbms/server/tasks/postgresql/template_fix.yml index 801e3148..6be8d86c 100644 --- a/roles/rdbms/server/tasks/postgresql/template_fix.yml +++ b/roles/rdbms/server/tasks/postgresql/template_fix.yml @@ -18,7 +18,7 @@ suffix: "-sql" register: __sql -- name: Allow allow access for the postgres user +- name: Enable access for the postgres user ansible.builtin.file: path: "{{ __sql.path }}" owner: postgres From 94e20159f997c78216e168ab56fb00ee161c198c Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 5 Sep 2024 22:53:46 -0400 Subject: [PATCH 05/10] Update PostgreSQL global config options to use ternary filters Signed-off-by: Webster Mudge --- roles/rdbms/server/vars/postgresql/common.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/rdbms/server/vars/postgresql/common.yml b/roles/rdbms/server/vars/postgresql/common.yml index 95c5e581..87d224cc 100644 --- a/roles/rdbms/server/vars/postgresql/common.yml +++ b/roles/rdbms/server/vars/postgresql/common.yml @@ -7,13 +7,13 @@ postgresql_global_config_options: - option: max_connections value: 300 - option: ssl - value: "{{ 'on' if database_tls else 'off' }}" + value: "{{ database_tls | bool | ternary('on', 'off') }}" - option: ssl_cert_file - value: "{{ tls_cert_path_generic if database_tls else None }}" + value: "{{ database_tls | bool | ternary(tls_cert_path_generic, None) }}" - option: ssl_key_file - value: "{{ tls_key_path_plaintext_generic if database_tls else None }}" + value: "{{ database_tls | bool | ternary(tls_key_path_plaintext_generic, None) }}" - option: ssl_ca_file - value: "{{ tls_chain_path if database_tls else None }}" + value: "{{ database_tls | bool | ternary(tls_chain_path, None) }}" postgresql_hba_entries: - {type: local, database: all, user: postgres, auth_method: peer} From 65b4a5f23e6b4bf1ed28c273b063d1da60c6c692 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Mon, 9 Sep 2024 17:00:36 -0400 Subject: [PATCH 06/10] Add argument spec for cloudera.exe.rdbms_server Signed-off-by: Webster Mudge --- roles/rdbms/server/defaults/main.yml | 11 +--- roles/rdbms/server/meta/argument_specs.yml | 75 ++++++++++++++++++++++ roles/rdbms/server/meta/main.yml | 1 + 3 files changed, 79 insertions(+), 8 deletions(-) create mode 100644 roles/rdbms/server/meta/argument_specs.yml diff --git a/roles/rdbms/server/defaults/main.yml b/roles/rdbms/server/defaults/main.yml index b0cbf585..2fc38626 100644 --- a/roles/rdbms/server/defaults/main.yml +++ b/roles/rdbms/server/defaults/main.yml @@ -18,17 +18,12 @@ database_tls: false database_type: postgresql database_version: 14 -skip_rdbms_repo_setup: False +skip_rdbms_repo_setup: false # MYSQL mysql_require_secure_transport: "OFF" # If TLS-enabled, honor or not -# From cloudera.cluster.infrastructure.ca_common -base_dir_security: /opt/cloudera/security -base_dir_security_pki: "{{ base_dir_security }}/pki" - +base_dir_security_pki: "/opt/cloudera/security/pki" tls_chain_path: "{{ base_dir_security_pki }}/chain.pem" tls_cert_path_generic: "{{ base_dir_security_pki }}/host.pem" - -tls_key_path_generic: "{{ base_dir_security_pki }}/host.key" -tls_key_path_plaintext_generic: "{{ tls_key_path_generic }}.unenc" +tls_key_path_plaintext_generic: "{{ base_dir_security_pki }}/host.key.unenc" diff --git a/roles/rdbms/server/meta/argument_specs.yml b/roles/rdbms/server/meta/argument_specs.yml new file mode 100644 index 00000000..03c90725 --- /dev/null +++ b/roles/rdbms/server/meta/argument_specs.yml @@ -0,0 +1,75 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +argument_specs: + main: + short_description: Install standalone RDBMS instance + description: + - Install and configure a standalone RDBMS instance for use with Cloudera Manager. + - Database options include PostgreSQL, MySQL, and MariaDB. + - Supports TLS connections. + options: + database_tls: + description: Flag to enable TLS configuration. + type: bool + default: false + database_type: + description: Database product to install. + type: str + required: false + default: postgresql + choices: + - postgresql + - mysql + - mariadb + database_version: + description: Database product version to install. + type: str + required: false + default: 14 + skip_rdbms_repo_setup: + description: Flag to enable RDBMS repository set up on target host. + type: bool + required: false + default: false + mysql_require_secure_transport: + description: Value for the C(require_secure_transport) parameter in the C([mysqld]) configuration. (MySQL only) + type: str + required: false + default: "OFF" + base_dir_security_pki: + description: + - Directory on target host housing typical PKI files. + - Used to establish a base directory for the other TLS options. + type: path + required: false + default: "/opt/cloudera/security/pki" + tls_chain_path: + description: File on the target host consisting of an ordered list of certificates, including TLS certificates and Certificate Authority (CA) certificates. + type: path + required: false + default: "O(base_dir_security_pki)/chain.pem" + tls_cert_path_generic: + description: File on the target host consisting of the TLS certificate for the server. + type: path + required: false + default: "O(base_dir_security_pki)/host.pem" + tls_key_path_plaintext_generic: + description: File on the target host consisting of the unencrypted TLS private key for the server. + type: path + required: false + default: "O(base_dir_security_pki)/host.key.unenc" + \ No newline at end of file diff --git a/roles/rdbms/server/meta/main.yml b/roles/rdbms/server/meta/main.yml index 40f56562..5dabd83b 100644 --- a/roles/rdbms/server/meta/main.yml +++ b/roles/rdbms/server/meta/main.yml @@ -13,6 +13,7 @@ # limitations under the License. --- + galaxy_info: description: > Set up single database to support Cloudera Data Platform (CDP) Private Cloud From 6afa1b2f3ff699905394b51ef9571cd3d951b99f Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Mon, 9 Sep 2024 17:02:08 -0400 Subject: [PATCH 07/10] Add license headers Signed-off-by: Webster Mudge --- roles/rdbms/server/vars/mariadb/Debian.yml | 15 +++++++++++++++ roles/rdbms/server/vars/mariadb/RedHat-7.yml | 15 +++++++++++++++ roles/rdbms/server/vars/mariadb/RedHat-8.yml | 15 +++++++++++++++ roles/rdbms/server/vars/mariadb/RedHat-9.yml | 15 +++++++++++++++ roles/rdbms/server/vars/mariadb/common.yml | 15 +++++++++++++++ roles/rdbms/server/vars/mysql/Debian.yml | 15 +++++++++++++++ roles/rdbms/server/vars/mysql/RedHat-7.yml | 14 ++++++++++++++ roles/rdbms/server/vars/mysql/RedHat-8.yml | 14 ++++++++++++++ roles/rdbms/server/vars/mysql/RedHat-9.yml | 14 ++++++++++++++ roles/rdbms/server/vars/mysql/common.yml | 15 +++++++++++++++ roles/rdbms/server/vars/postgresql/Debian.yml | 1 + roles/rdbms/server/vars/postgresql/common.yml | 15 +++++++++++++++ 12 files changed, 163 insertions(+) diff --git a/roles/rdbms/server/vars/mariadb/Debian.yml b/roles/rdbms/server/vars/mariadb/Debian.yml index 4df383c5..37eac2de 100644 --- a/roles/rdbms/server/vars/mariadb/Debian.yml +++ b/roles/rdbms/server/vars/mariadb/Debian.yml @@ -1,4 +1,19 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- + mysql_packages: - mariadb-client - mariadb-server diff --git a/roles/rdbms/server/vars/mariadb/RedHat-7.yml b/roles/rdbms/server/vars/mariadb/RedHat-7.yml index 8b18c87c..ac0415c7 100644 --- a/roles/rdbms/server/vars/mariadb/RedHat-7.yml +++ b/roles/rdbms/server/vars/mariadb/RedHat-7.yml @@ -1,4 +1,19 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- + mysql_packages: - mariadb - mariadb-server diff --git a/roles/rdbms/server/vars/mariadb/RedHat-8.yml b/roles/rdbms/server/vars/mariadb/RedHat-8.yml index fc96e9cd..8cf1839f 100644 --- a/roles/rdbms/server/vars/mariadb/RedHat-8.yml +++ b/roles/rdbms/server/vars/mariadb/RedHat-8.yml @@ -1,4 +1,19 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- + mysql_packages: - mariadb - mariadb-server diff --git a/roles/rdbms/server/vars/mariadb/RedHat-9.yml b/roles/rdbms/server/vars/mariadb/RedHat-9.yml index fc96e9cd..8cf1839f 100644 --- a/roles/rdbms/server/vars/mariadb/RedHat-9.yml +++ b/roles/rdbms/server/vars/mariadb/RedHat-9.yml @@ -1,4 +1,19 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- + mysql_packages: - mariadb - mariadb-server diff --git a/roles/rdbms/server/vars/mariadb/common.yml b/roles/rdbms/server/vars/mariadb/common.yml index 45bddf6a..64c7acb4 100644 --- a/roles/rdbms/server/vars/mariadb/common.yml +++ b/roles/rdbms/server/vars/mariadb/common.yml @@ -1,4 +1,19 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- + mysql_daemon: mariadb mysql_slow_query_log_file: /var/log/mysql-slow.log mysql_log_error: /var/log/mariadb/mariadb.log diff --git a/roles/rdbms/server/vars/mysql/Debian.yml b/roles/rdbms/server/vars/mysql/Debian.yml index 51f3a994..e7c2e6d0 100644 --- a/roles/rdbms/server/vars/mysql/Debian.yml +++ b/roles/rdbms/server/vars/mysql/Debian.yml @@ -1,4 +1,19 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- + mysql_repo: https://repo.mysql.com/mysql-apt-config_0.8.29-1_all.deb mysql_packages: - mariadb-client diff --git a/roles/rdbms/server/vars/mysql/RedHat-7.yml b/roles/rdbms/server/vars/mysql/RedHat-7.yml index 80b46121..7b05a01d 100644 --- a/roles/rdbms/server/vars/mysql/RedHat-7.yml +++ b/roles/rdbms/server/vars/mysql/RedHat-7.yml @@ -1,3 +1,17 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + mysql_repo: https://repo.mysql.com/mysql80-community-release-el7.rpm mysql_packages: diff --git a/roles/rdbms/server/vars/mysql/RedHat-8.yml b/roles/rdbms/server/vars/mysql/RedHat-8.yml index 762f8b1b..7cc60cd6 100644 --- a/roles/rdbms/server/vars/mysql/RedHat-8.yml +++ b/roles/rdbms/server/vars/mysql/RedHat-8.yml @@ -1,3 +1,17 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + mysql_repo: https://repo.mysql.com/mysql80-community-release-el8.rpm mysql_packages: diff --git a/roles/rdbms/server/vars/mysql/RedHat-9.yml b/roles/rdbms/server/vars/mysql/RedHat-9.yml index 09f528aa..a6d51b03 100644 --- a/roles/rdbms/server/vars/mysql/RedHat-9.yml +++ b/roles/rdbms/server/vars/mysql/RedHat-9.yml @@ -1,3 +1,17 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + mysql_repo: https://repo.mysql.com/mysql80-community-release-el9.rpm mysql_packages: diff --git a/roles/rdbms/server/vars/mysql/common.yml b/roles/rdbms/server/vars/mysql/common.yml index 8cd4dd80..e03c705d 100644 --- a/roles/rdbms/server/vars/mysql/common.yml +++ b/roles/rdbms/server/vars/mysql/common.yml @@ -1,4 +1,19 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- + mysql_repo_key: https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 mysql_root_password: 'Super$ecret1' diff --git a/roles/rdbms/server/vars/postgresql/Debian.yml b/roles/rdbms/server/vars/postgresql/Debian.yml index a020769d..2034df95 100644 --- a/roles/rdbms/server/vars/postgresql/Debian.yml +++ b/roles/rdbms/server/vars/postgresql/Debian.yml @@ -13,6 +13,7 @@ # limitations under the License. --- + postgresql_version: "{{ database_version }}" postgresql_data_dir: "/var/lib/postgresql/{{ postgresql_version }}/main" postgresql_bin_path: "/usr/lib/postgresql/{{ postgresql_version }}/bin" diff --git a/roles/rdbms/server/vars/postgresql/common.yml b/roles/rdbms/server/vars/postgresql/common.yml index 87d224cc..6943a705 100644 --- a/roles/rdbms/server/vars/postgresql/common.yml +++ b/roles/rdbms/server/vars/postgresql/common.yml @@ -1,4 +1,19 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- + postgresql_global_config_options: - option: log_directory value: 'log' From 612df37806e174472eb0b901427665f6b2edffd1 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Mon, 9 Sep 2024 17:02:57 -0400 Subject: [PATCH 08/10] Add deprecation warning for cloudera.exe.rdbms.server and redirect to cloudera.exe.rdbms_server Signed-off-by: Webster Mudge --- meta/runtime.yml | 8 ++++++++ roles/rdbms/server/tasks/main.yml | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/meta/runtime.yml b/meta/runtime.yml index 3dc9b998..87e89dc5 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -15,3 +15,11 @@ # limitations under the License. requires_ansible: ">=2.10" + +plugin_routing: + role: + rdbms.server: + deprecation: + removal_version: 3.0.0 + warning_text: Use cloudera.exe.rdbms_server instead of this nested role. + redirect: cloudera.exe.rdbms_server diff --git a/roles/rdbms/server/tasks/main.yml b/roles/rdbms/server/tasks/main.yml index d3809711..4417562a 100644 --- a/roles/rdbms/server/tasks/main.yml +++ b/roles/rdbms/server/tasks/main.yml @@ -13,6 +13,13 @@ # limitations under the License. --- + +- name: DEPRECATION WARNING + ansible.builtin.debug: + msg: + - This role has been moved to M(cloudera.exe.rdbms_server). + - Please update your playbooks and roles accordingly. + - name: Include database type variables ansible.builtin.include_vars: file: "{{ database_type }}/common.yml" From 550685075d14f9ece9760cc4a1ef15b6c26d1007 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Mon, 9 Sep 2024 17:03:26 -0400 Subject: [PATCH 09/10] Copy cloudera.exe.rdbms.server to cloudera.exe.rdbms_server Signed-off-by: Webster Mudge --- roles/rdbms_server/README.md | 17 +++++ roles/rdbms_server/defaults/main.yml | 29 +++++++ roles/rdbms_server/handlers/main.yml | 18 +++++ roles/rdbms_server/meta/argument_specs.yml | 75 +++++++++++++++++++ roles/rdbms_server/meta/main.yml | 22 ++++++ roles/rdbms_server/tasks/main.yml | 33 ++++++++ roles/rdbms_server/tasks/mariadb/Debian.yml | 29 +++++++ roles/rdbms_server/tasks/mariadb/RedHat.yml | 31 ++++++++ roles/rdbms_server/tasks/mysql/RedHat.yml | 37 +++++++++ .../rdbms_server/tasks/postgresql/Debian.yml | 43 +++++++++++ .../rdbms_server/tasks/postgresql/RedHat.yml | 58 ++++++++++++++ .../tasks/postgresql/template_fix.yml | 44 +++++++++++ roles/rdbms_server/templates/cloudera.cnf | 26 +++++++ roles/rdbms_server/vars/mariadb/Debian.yml | 20 +++++ roles/rdbms_server/vars/mariadb/RedHat-7.yml | 22 ++++++ roles/rdbms_server/vars/mariadb/RedHat-8.yml | 22 ++++++ roles/rdbms_server/vars/mariadb/RedHat-9.yml | 22 ++++++ roles/rdbms_server/vars/mariadb/common.yml | 27 +++++++ roles/rdbms_server/vars/mysql/Debian.yml | 21 ++++++ roles/rdbms_server/vars/mysql/RedHat-7.yml | 21 ++++++ roles/rdbms_server/vars/mysql/RedHat-8.yml | 22 ++++++ roles/rdbms_server/vars/mysql/RedHat-9.yml | 22 ++++++ roles/rdbms_server/vars/mysql/common.yml | 28 +++++++ roles/rdbms_server/vars/postgresql/Debian.yml | 24 ++++++ roles/rdbms_server/vars/postgresql/RedHat.yml | 28 +++++++ roles/rdbms_server/vars/postgresql/common.yml | 38 ++++++++++ 26 files changed, 779 insertions(+) create mode 100644 roles/rdbms_server/README.md create mode 100644 roles/rdbms_server/defaults/main.yml create mode 100644 roles/rdbms_server/handlers/main.yml create mode 100644 roles/rdbms_server/meta/argument_specs.yml create mode 100644 roles/rdbms_server/meta/main.yml create mode 100644 roles/rdbms_server/tasks/main.yml create mode 100644 roles/rdbms_server/tasks/mariadb/Debian.yml create mode 100644 roles/rdbms_server/tasks/mariadb/RedHat.yml create mode 100644 roles/rdbms_server/tasks/mysql/RedHat.yml create mode 100644 roles/rdbms_server/tasks/postgresql/Debian.yml create mode 100644 roles/rdbms_server/tasks/postgresql/RedHat.yml create mode 100644 roles/rdbms_server/tasks/postgresql/template_fix.yml create mode 100644 roles/rdbms_server/templates/cloudera.cnf create mode 100644 roles/rdbms_server/vars/mariadb/Debian.yml create mode 100644 roles/rdbms_server/vars/mariadb/RedHat-7.yml create mode 100644 roles/rdbms_server/vars/mariadb/RedHat-8.yml create mode 100644 roles/rdbms_server/vars/mariadb/RedHat-9.yml create mode 100644 roles/rdbms_server/vars/mariadb/common.yml create mode 100644 roles/rdbms_server/vars/mysql/Debian.yml create mode 100644 roles/rdbms_server/vars/mysql/RedHat-7.yml create mode 100644 roles/rdbms_server/vars/mysql/RedHat-8.yml create mode 100644 roles/rdbms_server/vars/mysql/RedHat-9.yml create mode 100644 roles/rdbms_server/vars/mysql/common.yml create mode 100644 roles/rdbms_server/vars/postgresql/Debian.yml create mode 100644 roles/rdbms_server/vars/postgresql/RedHat.yml create mode 100644 roles/rdbms_server/vars/postgresql/common.yml diff --git a/roles/rdbms_server/README.md b/roles/rdbms_server/README.md new file mode 100644 index 00000000..8aa8bdf4 --- /dev/null +++ b/roles/rdbms_server/README.md @@ -0,0 +1,17 @@ + + +# rdbms server diff --git a/roles/rdbms_server/defaults/main.yml b/roles/rdbms_server/defaults/main.yml new file mode 100644 index 00000000..2fc38626 --- /dev/null +++ b/roles/rdbms_server/defaults/main.yml @@ -0,0 +1,29 @@ +# Copyright 2024 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +database_tls: false +database_type: postgresql +database_version: 14 + +skip_rdbms_repo_setup: false + +# MYSQL +mysql_require_secure_transport: "OFF" # If TLS-enabled, honor or not + +base_dir_security_pki: "/opt/cloudera/security/pki" +tls_chain_path: "{{ base_dir_security_pki }}/chain.pem" +tls_cert_path_generic: "{{ base_dir_security_pki }}/host.pem" +tls_key_path_plaintext_generic: "{{ base_dir_security_pki }}/host.key.unenc" diff --git a/roles/rdbms_server/handlers/main.yml b/roles/rdbms_server/handlers/main.yml new file mode 100644 index 00000000..034c8b04 --- /dev/null +++ b/roles/rdbms_server/handlers/main.yml @@ -0,0 +1,18 @@ +# Copyright 2024 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +- name: yum clean metadata + ansible.builtin.command: yum clean metadata diff --git a/roles/rdbms_server/meta/argument_specs.yml b/roles/rdbms_server/meta/argument_specs.yml new file mode 100644 index 00000000..48ded70c --- /dev/null +++ b/roles/rdbms_server/meta/argument_specs.yml @@ -0,0 +1,75 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +argument_specs: + main: + short_description: Install standalone RDBMS instance + description: + - Install and configure a standalone RDBMS instance for use with Cloudera Manager. + - Database options include PostgreSQL, MySQL, and MariaDB. + - Supports TLS connections. + options: + database_tls: + description: Flag to enable TLS configuration. + type: bool + default: false + database_type: + description: Database product to install. + type: str + required: false + default: postgresql + choices: + - postgresql + - mysql + - mariadb + database_version: + description: Database product version to install. + type: str + required: false + default: 14 + skip_rdbms_repo_setup: + description: Flag to enable RDBMS repository set up on target host. + type: bool + required: false + default: false + mysql_require_secure_transport: + description: Value for the C(require_secure_transport) parameter in the C([mysqld]) configuration. (MySQL only) + type: str + required: false + default: "OFF" + base_dir_security_pki: + description: + - Directory on target host housing typical PKI files. + - Used to establish a base directory for the other TLS options. + type: path + required: false + default: "/opt/cloudera/security/pki" + tls_chain_path: + description: File on the target host consisting of an ordered list of certificates, including TLS certificates and Certificate Authority (CA) certificates. + type: path + required: false + default: "C(base_dir_security_pki)/chain.pem" + tls_cert_path_generic: + description: File on the target host consisting of the TLS certificate for the server. + type: path + required: false + default: "C(base_dir_security_pki)/host.pem" + tls_key_path_plaintext_generic: + description: File on the target host consisting of the unencrypted TLS private key for the server. + type: path + required: false + default: "C(base_dir_security_pki)/host.key.unenc" + \ No newline at end of file diff --git a/roles/rdbms_server/meta/main.yml b/roles/rdbms_server/meta/main.yml new file mode 100644 index 00000000..5dabd83b --- /dev/null +++ b/roles/rdbms_server/meta/main.yml @@ -0,0 +1,22 @@ +# Copyright 2023 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +galaxy_info: + description: > + Set up single database to support Cloudera Data Platform (CDP) Private Cloud + deployments. + company: Cloudera + license: Apache-2.0 diff --git a/roles/rdbms_server/tasks/main.yml b/roles/rdbms_server/tasks/main.yml new file mode 100644 index 00000000..77fdce52 --- /dev/null +++ b/roles/rdbms_server/tasks/main.yml @@ -0,0 +1,33 @@ +# Copyright 2024 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +- name: Include database type variables + ansible.builtin.include_vars: + file: "{{ database_type }}/common.yml" + +- name: Include database type and OS specific variables + ansible.builtin.include_vars: + file: "{{ item }}" + with_first_found: + - "{{ database_type }}/{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml" + - "{{ database_type }}/{{ ansible_os_family }}.yml" + +- name: Install database + ansible.builtin.include_tasks: + file: "{{ item }}" + with_first_found: + - "{{ database_type }}/{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml" + - "{{ database_type }}/{{ ansible_os_family }}.yml" diff --git a/roles/rdbms_server/tasks/mariadb/Debian.yml b/roles/rdbms_server/tasks/mariadb/Debian.yml new file mode 100644 index 00000000..f14ad6a3 --- /dev/null +++ b/roles/rdbms_server/tasks/mariadb/Debian.yml @@ -0,0 +1,29 @@ +# Copyright 2024 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Install MariaDB apt key + ansible.builtin.apt_key: + url: https://mariadb.org/mariadb_release_signing_key.asc + state: present + when: not skip_rdbms_repo_setup + +- name: Install MariaDB apt repository + ansible.builtin.apt_repository: + repo: deb [arch=amd64,arm64,ppc64el] https://downloads.mariadb.com/MariaDB/mariadb-{{ database_version }}/repo/ubuntu/ bionic main + state: present + when: not skip_rdbms_repo_setup + +- name: Install MariaDB + ansible.builtin.include_role: + name: ansible-role-mysql diff --git a/roles/rdbms_server/tasks/mariadb/RedHat.yml b/roles/rdbms_server/tasks/mariadb/RedHat.yml new file mode 100644 index 00000000..07a8f8bc --- /dev/null +++ b/roles/rdbms_server/tasks/mariadb/RedHat.yml @@ -0,0 +1,31 @@ +# Copyright 2024 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Install MariaDB repository + ansible.builtin.yum_repository: + name: MariaDB + description: MariaDB {{ database_version }} repository for RHEL + baseurl: https://yum.mariadb.org/{{ database_version }}/rhel{{ ansible_distribution_major_version }}-amd64 + gpgkey: https://yum.mariadb.org/RPM-GPG-KEY-MariaDB + when: not skip_rdbms_repo_setup + +- name: Disable modularity appstream, when RHEL 8 + ansible.builtin.command: yum -y module disable mysql mariadb + when: + - not skip_rdbms_repo_setup + - ansible_distribution_major_version == "8" + +- name: Install Mariadb + ansible.builtin.include_role: + name: ansible-role-mysql diff --git a/roles/rdbms_server/tasks/mysql/RedHat.yml b/roles/rdbms_server/tasks/mysql/RedHat.yml new file mode 100644 index 00000000..5bcfb60c --- /dev/null +++ b/roles/rdbms_server/tasks/mysql/RedHat.yml @@ -0,0 +1,37 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Import MySQL repository GPG Key + ansible.builtin.rpm_key: + key: "{{ mysql_repo_key }}" + state: present + when: not skip_rdbms_repo_setup + +- name: Install MySQL repository + ansible.builtin.yum: + name: "{{ mysql_repo }}" + update_cache: true + lock_timeout: 180 + state: present + when: not skip_rdbms_repo_setup + +- name: Disable modularity appstream, when RHEL 8 + ansible.builtin.command: yum -y module disable mysql mariadb + when: + - not skip_rdbms_repo_setup + - ansible_distribution_major_version == "8" + +- name: Install MySQL + ansible.builtin.include_role: + name: ansible-role-mysql diff --git a/roles/rdbms_server/tasks/postgresql/Debian.yml b/roles/rdbms_server/tasks/postgresql/Debian.yml new file mode 100644 index 00000000..5bdca9d7 --- /dev/null +++ b/roles/rdbms_server/tasks/postgresql/Debian.yml @@ -0,0 +1,43 @@ +# Copyright 2024 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Install keyrings directory + ansible.builtin.file: + path: /etc/apt/keyrings + state: directory + +- name: Install PostgreSQL repository key + ansible.builtin.get_url: + url: https://www.postgresql.org/media/keys/ACCC4CF8.asc + dest: /etc/apt/keyrings/postgresql.asc + when: not skip_rdbms_repo_setup + +- name: Install PostgreSQL repository + ansible.builtin.apt_repository: + repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/postgresql.asc] https://apt.postgresql.org/pub/repos/apt {{ ansible_distribution_release }}-pgdg main" + state: present + when: not skip_rdbms_repo_setup + +- name: Install PostgreSQL + ansible.builtin.include_role: + name: geerlingguy.postgresql + +- name: Install python-psycopg2 + ansible.builtin.pip: + name: psycopg2-binary + state: latest + +- name: Fix UTF-8 template + ansible.builtin.include_tasks: + file: template_fix.yml diff --git a/roles/rdbms_server/tasks/postgresql/RedHat.yml b/roles/rdbms_server/tasks/postgresql/RedHat.yml new file mode 100644 index 00000000..404d96a6 --- /dev/null +++ b/roles/rdbms_server/tasks/postgresql/RedHat.yml @@ -0,0 +1,58 @@ +# Copyright 2024 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Install PostgreSQL common repository + ansible.builtin.yum_repository: + name: pgdg-common + description: PostgreSQL common for RHEL/CentOS + baseurl: https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-$releasever-$basearch + gpgkey: https://download.postgresql.org/pub/repos/yum/keys/PGDG-RPM-GPG-KEY-RHEL + when: not skip_rdbms_repo_setup + +- name: Install PostgreSQL version repository + ansible.builtin.yum_repository: + name: pgdg + description: PostgreSQL {{ postgresql_version }} for RHEL/CentOS + baseurl: https://download.postgresql.org/pub/repos/yum/{{ postgresql_version }}/redhat/rhel-$releasever-$basearch + gpgkey: https://download.postgresql.org/pub/repos/yum/keys/PGDG-RPM-GPG-KEY-RHEL + when: not skip_rdbms_repo_setup + +- name: Disable default Postgres module in RHEL 8 or greater + ansible.builtin.command: dnf module disable -y postgresql + register: __postgres_module_result + changed_when: + - '"Disabling modules" in __postgres_module_result.stdout' + failed_when: + - __postgres_module_result.rc != 0 and __postgres_module_result.rc != 1 + when: + - ansible_os_family == 'RedHat' + - ansible_distribution_major_version | int >= 8 + +- name: Install PostgreSQL + ansible.builtin.include_role: + name: geerlingguy.postgresql + +- name: Fix UTF-8 template + ansible.builtin.include_tasks: + file: postgresql/template_fix.yml + +- name: Remove repositories and clean metadata + ansible.builtin.yum_repository: + name: "{{ item }}" + state: absent + with_items: + - pgdg-common + - pgdg + when: not skip_rdbms_repo_setup + notify: yum clean metadata diff --git a/roles/rdbms_server/tasks/postgresql/template_fix.yml b/roles/rdbms_server/tasks/postgresql/template_fix.yml new file mode 100644 index 00000000..6be8d86c --- /dev/null +++ b/roles/rdbms_server/tasks/postgresql/template_fix.yml @@ -0,0 +1,44 @@ +# Copyright 2024 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Create a temporary SQL directory + ansible.builtin.tempfile: + state: directory + suffix: "-sql" + register: __sql + +- name: Enable access for the postgres user + ansible.builtin.file: + path: "{{ __sql.path }}" + owner: postgres + group: postgres + +- name: Copy SQL to change template to UTF-8 + ansible.builtin.copy: + src: files/utf8-template.sql + dest: "{{ __sql.path }}/utf8-template.sql" + owner: postgres + group: postgres + mode: 0660 + +- name: Run SQL to change template to UTF-8 + ansible.builtin.command: "psql -f {{ __sql.path }}/utf8-template.sql" + become: yes + become_user: postgres + +- name: Remove temporary SQL directory + ansible.builtin.file: + path: "{{ __sql.path }}" + state: absent + become: yes diff --git a/roles/rdbms_server/templates/cloudera.cnf b/roles/rdbms_server/templates/cloudera.cnf new file mode 100644 index 00000000..19ae1a11 --- /dev/null +++ b/roles/rdbms_server/templates/cloudera.cnf @@ -0,0 +1,26 @@ +[mysqld] +log_bin_trust_function_creators = 1 +{% if database_tls %} +# SSL configuration +ssl_ca = {{ tls_chain_path }} +ssl_cert = {{ tls_cert_path_generic }} +ssl_key = {{ tls_key_path_plaintext_generic }} + {% if database_version is version('8.0','>=') %} {# This doesn't make any sense with the check below... is this for MariaDB vs MySQL? #} +require_secure_transport = {{ mysql_require_secure_transport }} + {% endif %} + {% if database_version is version('10.5.2','>=') %} +require_secure_transport = {{ mysql_require_secure_transport }} + {% endif %} + {% if mysql_ssl_cipher is defined %} +ssl_cipher = {{ mysql_ssl_cipher }} + {% endif %} + {% if mysql_ssl_crl is defined %} +ssl_crl = {{ mysql_ssl_crl }} + {% endif %} + {% if mysql_ssl_crlpath is defined %} +ssl_crlpath = {{ mysql_ssl_crlpath }} + {% endif %} + {% if mysql_tls_version is defined %} +tls_version = {{ mysql_tls_version }} + {% endif %} +{% endif %} diff --git a/roles/rdbms_server/vars/mariadb/Debian.yml b/roles/rdbms_server/vars/mariadb/Debian.yml new file mode 100644 index 00000000..8cdde6fb --- /dev/null +++ b/roles/rdbms_server/vars/mariadb/Debian.yml @@ -0,0 +1,20 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +mysql_packages: + - mariadb-client + - mariadb-server + - python-mysqldb diff --git a/roles/rdbms_server/vars/mariadb/RedHat-7.yml b/roles/rdbms_server/vars/mariadb/RedHat-7.yml new file mode 100644 index 00000000..49b945bc --- /dev/null +++ b/roles/rdbms_server/vars/mariadb/RedHat-7.yml @@ -0,0 +1,22 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +mysql_packages: + - mariadb + - mariadb-server + - mariadb-libs + - MySQL-python + - perl-DBD-MySQL diff --git a/roles/rdbms_server/vars/mariadb/RedHat-8.yml b/roles/rdbms_server/vars/mariadb/RedHat-8.yml new file mode 100644 index 00000000..ff292dcf --- /dev/null +++ b/roles/rdbms_server/vars/mariadb/RedHat-8.yml @@ -0,0 +1,22 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +mysql_packages: + - mariadb + - mariadb-server + - mariadb-connector-c + - python3-PyMySQL + - perl-DBD-MySQL diff --git a/roles/rdbms_server/vars/mariadb/RedHat-9.yml b/roles/rdbms_server/vars/mariadb/RedHat-9.yml new file mode 100644 index 00000000..ff292dcf --- /dev/null +++ b/roles/rdbms_server/vars/mariadb/RedHat-9.yml @@ -0,0 +1,22 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +mysql_packages: + - mariadb + - mariadb-server + - mariadb-connector-c + - python3-PyMySQL + - perl-DBD-MySQL diff --git a/roles/rdbms_server/vars/mariadb/common.yml b/roles/rdbms_server/vars/mariadb/common.yml new file mode 100644 index 00000000..c877c9cb --- /dev/null +++ b/roles/rdbms_server/vars/mariadb/common.yml @@ -0,0 +1,27 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +mysql_daemon: mariadb +mysql_slow_query_log_file: /var/log/mysql-slow.log +mysql_log_error: /var/log/mariadb/mariadb.log +mysql_syslog_tag: mariadb +mysql_pid_file: /var/run/mariadb/mariadb.pid +mysql_config_file: /etc/my.cnf +mysql_config_include_dir: /etc/my.cnf.d +mysql_socket: /var/lib/mysql/mysql.sock +mysql_config_include_files: + - src: "cloudera.cnf" + force: true diff --git a/roles/rdbms_server/vars/mysql/Debian.yml b/roles/rdbms_server/vars/mysql/Debian.yml new file mode 100644 index 00000000..7f40a4b5 --- /dev/null +++ b/roles/rdbms_server/vars/mysql/Debian.yml @@ -0,0 +1,21 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +mysql_repo: https://repo.mysql.com/mysql-apt-config_0.8.29-1_all.deb +mysql_packages: + - mariadb-client + - mariadb-server + - python-mysqldb diff --git a/roles/rdbms_server/vars/mysql/RedHat-7.yml b/roles/rdbms_server/vars/mysql/RedHat-7.yml new file mode 100644 index 00000000..a6922c2a --- /dev/null +++ b/roles/rdbms_server/vars/mysql/RedHat-7.yml @@ -0,0 +1,21 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +mysql_repo: https://repo.mysql.com/mysql80-community-release-el7.rpm + +mysql_packages: + - mysql + - mysql-server + - MySQL-python + - perl-DBD-MySQL diff --git a/roles/rdbms_server/vars/mysql/RedHat-8.yml b/roles/rdbms_server/vars/mysql/RedHat-8.yml new file mode 100644 index 00000000..593a61e6 --- /dev/null +++ b/roles/rdbms_server/vars/mysql/RedHat-8.yml @@ -0,0 +1,22 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +mysql_repo: https://repo.mysql.com/mysql80-community-release-el8.rpm + +mysql_packages: + - mysql + - mysql-server + - mysql-connector-c++ + - python3-PyMySQL + - perl-DBD-MySQL diff --git a/roles/rdbms_server/vars/mysql/RedHat-9.yml b/roles/rdbms_server/vars/mysql/RedHat-9.yml new file mode 100644 index 00000000..c2c1d673 --- /dev/null +++ b/roles/rdbms_server/vars/mysql/RedHat-9.yml @@ -0,0 +1,22 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +mysql_repo: https://repo.mysql.com/mysql80-community-release-el9.rpm + +mysql_packages: + - mysql + - mysql-server + - mysql-connector-c++ + - python3-PyMySQL + - perl-DBD-MySQL diff --git a/roles/rdbms_server/vars/mysql/common.yml b/roles/rdbms_server/vars/mysql/common.yml new file mode 100644 index 00000000..44a3faba --- /dev/null +++ b/roles/rdbms_server/vars/mysql/common.yml @@ -0,0 +1,28 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +mysql_repo_key: https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 + +mysql_root_password: 'Super$ecret1' +mysql_user_password: 'Super$ecret1' +mysql_daemon: mysqld +mysql_log_error: /var/log/mysqld.log +mysql_syslog_tag: mysqld +mysql_pid_file: /var/run/mysqld/mysqld.pid +mysql_socket: /var/lib/mysql/mysql.sock +mysql_config_include_files: + - src: "cloudera.cnf" + force: true diff --git a/roles/rdbms_server/vars/postgresql/Debian.yml b/roles/rdbms_server/vars/postgresql/Debian.yml new file mode 100644 index 00000000..2034df95 --- /dev/null +++ b/roles/rdbms_server/vars/postgresql/Debian.yml @@ -0,0 +1,24 @@ +# Copyright 2024 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +postgresql_version: "{{ database_version }}" +postgresql_data_dir: "/var/lib/postgresql/{{ postgresql_version }}/main" +postgresql_bin_path: "/usr/lib/postgresql/{{ postgresql_version }}/bin" +postgresql_config_path: "/etc/postgresql/{{ postgresql_version }}/main" +postgresql_packages: + - "postgresql-{{ postgresql_version }}" + - "postgresql-contrib-{{ postgresql_version }}" + - "postgresql-server-dev-{{ postgresql_version }}" diff --git a/roles/rdbms_server/vars/postgresql/RedHat.yml b/roles/rdbms_server/vars/postgresql/RedHat.yml new file mode 100644 index 00000000..68da0859 --- /dev/null +++ b/roles/rdbms_server/vars/postgresql/RedHat.yml @@ -0,0 +1,28 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +postgresql_version: "{{ database_version }}" +postgresql_data_dir: /var/lib/pgsql/{{ postgresql_version }}/data +postgresql_bin_path: /usr/pgsql-{{ postgresql_version }}/bin +postgresql_config_path: /var/lib/pgsql/{{ postgresql_version }}/data +postgresql_daemon: postgresql-{{ postgresql_version }}.service +# Removed devel package as avoids dependency on perl-IPC-run in pg 12+ +postgresql_packages: + - postgresql{{ postgresql_version | regex_replace('\.','') }} + - postgresql{{ postgresql_version | regex_replace('\.','') }}-server + - postgresql{{ postgresql_version | regex_replace('\.','') }}-libs + - postgresql{{ postgresql_version | regex_replace('\.','') }}-contrib +# - postgresql{{ postgresql_version | regex_replace('\.','') }}-devel +postgresql_python_library: python-psycopg2 diff --git a/roles/rdbms_server/vars/postgresql/common.yml b/roles/rdbms_server/vars/postgresql/common.yml new file mode 100644 index 00000000..ca130954 --- /dev/null +++ b/roles/rdbms_server/vars/postgresql/common.yml @@ -0,0 +1,38 @@ +# Copyright 2024 Cloudera, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +postgresql_global_config_options: + - option: log_directory + value: 'log' + - option: listen_addresses + value: '*' + - option: max_connections + value: 300 + - option: ssl + value: "{{ database_tls | bool | ternary('on', 'off') }}" + - option: ssl_cert_file + value: "{{ database_tls | bool | ternary(tls_cert_path_generic, None) }}" + - option: ssl_key_file + value: "{{ database_tls | bool | ternary(tls_key_path_plaintext_generic, None) }}" + - option: ssl_ca_file + value: "{{ database_tls | bool | ternary(tls_chain_path, None) }}" + +postgresql_hba_entries: + - {type: local, database: all, user: postgres, auth_method: peer} + - {type: local, database: all, user: all, auth_method: peer} + - {type: host, database: all, user: all, address: '127.0.0.1/32', auth_method: md5} + - {type: host, database: all, user: all, address: '::1/128', auth_method: md5} + - {type: host, database: all, user: all, address: '0.0.0.0/0', auth_method: md5} From 534b9ece78b9e95c7e31709fd1721d7f411a3e5b Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Mon, 9 Sep 2024 17:07:26 -0400 Subject: [PATCH 10/10] Fix pre-commit violations Signed-off-by: Webster Mudge --- roles/rdbms/server/meta/argument_specs.yml | 7 +++---- roles/rdbms_server/meta/argument_specs.yml | 7 +++---- roles/rdbms_server/vars/mariadb/Debian.yml | 6 +++--- roles/rdbms_server/vars/mariadb/RedHat-7.yml | 6 +++--- roles/rdbms_server/vars/mariadb/RedHat-8.yml | 6 +++--- roles/rdbms_server/vars/mariadb/RedHat-9.yml | 6 +++--- roles/rdbms_server/vars/mariadb/common.yml | 6 +++--- roles/rdbms_server/vars/mysql/Debian.yml | 6 +++--- roles/rdbms_server/vars/mysql/RedHat-7.yml | 6 +++--- roles/rdbms_server/vars/mysql/RedHat-8.yml | 6 +++--- roles/rdbms_server/vars/mysql/RedHat-9.yml | 6 +++--- roles/rdbms_server/vars/mysql/common.yml | 6 +++--- roles/rdbms_server/vars/postgresql/common.yml | 6 +++--- 13 files changed, 39 insertions(+), 41 deletions(-) diff --git a/roles/rdbms/server/meta/argument_specs.yml b/roles/rdbms/server/meta/argument_specs.yml index 03c90725..29129c28 100644 --- a/roles/rdbms/server/meta/argument_specs.yml +++ b/roles/rdbms/server/meta/argument_specs.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -72,4 +72,3 @@ argument_specs: type: path required: false default: "O(base_dir_security_pki)/host.key.unenc" - \ No newline at end of file diff --git a/roles/rdbms_server/meta/argument_specs.yml b/roles/rdbms_server/meta/argument_specs.yml index 48ded70c..a1e34737 100644 --- a/roles/rdbms_server/meta/argument_specs.yml +++ b/roles/rdbms_server/meta/argument_specs.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -72,4 +72,3 @@ argument_specs: type: path required: false default: "C(base_dir_security_pki)/host.key.unenc" - \ No newline at end of file diff --git a/roles/rdbms_server/vars/mariadb/Debian.yml b/roles/rdbms_server/vars/mariadb/Debian.yml index 8cdde6fb..37eac2de 100644 --- a/roles/rdbms_server/vars/mariadb/Debian.yml +++ b/roles/rdbms_server/vars/mariadb/Debian.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/roles/rdbms_server/vars/mariadb/RedHat-7.yml b/roles/rdbms_server/vars/mariadb/RedHat-7.yml index 49b945bc..ac0415c7 100644 --- a/roles/rdbms_server/vars/mariadb/RedHat-7.yml +++ b/roles/rdbms_server/vars/mariadb/RedHat-7.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/roles/rdbms_server/vars/mariadb/RedHat-8.yml b/roles/rdbms_server/vars/mariadb/RedHat-8.yml index ff292dcf..8cf1839f 100644 --- a/roles/rdbms_server/vars/mariadb/RedHat-8.yml +++ b/roles/rdbms_server/vars/mariadb/RedHat-8.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/roles/rdbms_server/vars/mariadb/RedHat-9.yml b/roles/rdbms_server/vars/mariadb/RedHat-9.yml index ff292dcf..8cf1839f 100644 --- a/roles/rdbms_server/vars/mariadb/RedHat-9.yml +++ b/roles/rdbms_server/vars/mariadb/RedHat-9.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/roles/rdbms_server/vars/mariadb/common.yml b/roles/rdbms_server/vars/mariadb/common.yml index c877c9cb..64c7acb4 100644 --- a/roles/rdbms_server/vars/mariadb/common.yml +++ b/roles/rdbms_server/vars/mariadb/common.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/roles/rdbms_server/vars/mysql/Debian.yml b/roles/rdbms_server/vars/mysql/Debian.yml index 7f40a4b5..e7c2e6d0 100644 --- a/roles/rdbms_server/vars/mysql/Debian.yml +++ b/roles/rdbms_server/vars/mysql/Debian.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/roles/rdbms_server/vars/mysql/RedHat-7.yml b/roles/rdbms_server/vars/mysql/RedHat-7.yml index a6922c2a..7b05a01d 100644 --- a/roles/rdbms_server/vars/mysql/RedHat-7.yml +++ b/roles/rdbms_server/vars/mysql/RedHat-7.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/roles/rdbms_server/vars/mysql/RedHat-8.yml b/roles/rdbms_server/vars/mysql/RedHat-8.yml index 593a61e6..7cc60cd6 100644 --- a/roles/rdbms_server/vars/mysql/RedHat-8.yml +++ b/roles/rdbms_server/vars/mysql/RedHat-8.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/roles/rdbms_server/vars/mysql/RedHat-9.yml b/roles/rdbms_server/vars/mysql/RedHat-9.yml index c2c1d673..a6d51b03 100644 --- a/roles/rdbms_server/vars/mysql/RedHat-9.yml +++ b/roles/rdbms_server/vars/mysql/RedHat-9.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/roles/rdbms_server/vars/mysql/common.yml b/roles/rdbms_server/vars/mysql/common.yml index 44a3faba..e03c705d 100644 --- a/roles/rdbms_server/vars/mysql/common.yml +++ b/roles/rdbms_server/vars/mysql/common.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/roles/rdbms_server/vars/postgresql/common.yml b/roles/rdbms_server/vars/postgresql/common.yml index ca130954..6943a705 100644 --- a/roles/rdbms_server/vars/postgresql/common.yml +++ b/roles/rdbms_server/vars/postgresql/common.yml @@ -1,11 +1,11 @@ # Copyright 2024 Cloudera, Inc. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # https://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.