Created
December 11, 2020 18:10
-
-
Save mikedep333/c70a1da4230af5da3daec545e304ffa2 to your computer and use it in GitHub Desktop.
Incomplete fix for pulp_installer issue with EL7 LANG=C.UTF-8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/requirements.yml b/requirements.yml | |
index 70b756a..ad6b4c7 100644 | |
--- a/requirements.yml | |
+++ b/requirements.yml | |
@@ -1,5 +1,3 @@ | |
--- | |
-roles: | |
- - { name: geerlingguy.postgresql, version: 2.2.1 } | |
collections: | |
- ansible.posix | |
diff --git a/roles/pulp_database/tasks/install_postgres.yml b/roles/pulp_database/tasks/install_postgres.yml | |
index d29a327..a8fc24d 100644 | |
--- a/roles/pulp_database/tasks/install_postgres.yml | |
+++ b/roles/pulp_database/tasks/install_postgres.yml | |
@@ -27,4 +27,7 @@ | |
- name: Install and configure PostgreSQL | |
include_role: | |
name: geerlingguy.postgresql | |
+ apply: | |
+ environment: "{{ __postgresql_role_env | default(omit) }}" | |
+ | |
become: yes | |
diff --git a/roles/pulp_database/vars/RedHat-7.yml b/roles/pulp_database/vars/RedHat-7.yml | |
index b35e8ac..f0e506d 100644 | |
--- a/roles/pulp_database/vars/RedHat-7.yml | |
+++ b/roles/pulp_database/vars/RedHat-7.yml | |
@@ -6,3 +6,12 @@ postgresql_bin_path: /opt/rh/rh-postgresql96/root/bin | |
postgresql_data_dir: /var/opt/rh/rh-postgresql96/lib/pgsql/data | |
postgresql_config_path: /var/opt/rh/rh-postgresql96/lib/pgsql/data | |
postgresql_profile_path: /etc/profile.d/enablepostgresql96.sh | |
+# Postgres 9.6 cannot handle C.UTF-8, a new common Linux standard. | |
+# Some users need this anyway, but it is triggered when C.UTF-8 | |
+# bleeds from Ubuntu 20.04 (GHA) to the managed system via Vagrant. | |
+# | |
+# Ansible would fail on task/error: | |
+# geerlingguy.postgresql : Ensure PostgreSQL database is initialized. | |
+# "FATAL: invalid input syntax for integer: \"NAMEDATALEN\" | |
+__postgresql_role_env: | |
+ LANG: en_US.UTF-8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment