From cc3a619e4b9a8b140fbea8124e76e69850de2c9b Mon Sep 17 00:00:00 2001 From: SysAdmin DCC Date: Wed, 3 Dec 2025 00:15:58 +0000 Subject: [PATCH] fix: Usar PostgreSQL disponible en Debian 13 y limpiar duplicados --- group_vars/all.yml | 8 -------- roles/postgresql_native/tasks/main.yml | 13 +++++++++---- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/group_vars/all.yml b/group_vars/all.yml index acf6df1..2fae967 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -14,14 +14,6 @@ authentik_secret: "GenerarStringLargoAleatorio123456" authentik_pg_pass: "AuthDBSecret123" pg_version: "16" -# --- ALICANTE CORE V3.2 CONFIGURATION --- -# Carbone (Stack Docs) -core_ip: "10.10.10.104" -a412b12 (Fix: V3.2 upgrade paths) - -# Activepieces Configuration -ap_encryption_key: "ff7d959b67bc4b31752d51c3db3bbb5b" -ap_jwt_secret: "eW4o2aZs0yNT3Z9kSS6IYDLtMtJ/Uh1acV0HIYOfrtI=" # ============================================================================ # ALICANTE CORE V3.3 - Credenciales estándar # ============================================================================ diff --git a/roles/postgresql_native/tasks/main.yml b/roles/postgresql_native/tasks/main.yml index 59af55e..4176c54 100644 --- a/roles/postgresql_native/tasks/main.yml +++ b/roles/postgresql_native/tasks/main.yml @@ -1,23 +1,28 @@ --- -- name: Instalar PostgreSQL 15 +- name: Instalar PostgreSQL (versión disponible en Debian) apt: name: - - postgresql-15 + - postgresql - postgresql-contrib - python3-psycopg2 state: present update_cache: yes +- name: Detectar versión de PostgreSQL instalada + shell: "ls -1 /etc/postgresql/ | head -1" + register: pg_version + changed_when: false + - name: Configurar PostgreSQL para escuchar en localhost lineinfile: - path: /etc/postgresql/15/main/postgresql.conf + path: "/etc/postgresql/{{ pg_version.stdout }}/main/postgresql.conf" regexp: '^#?listen_addresses' line: "listen_addresses = 'localhost'" notify: restart postgresql - name: Permitir conexiones locales con password lineinfile: - path: /etc/postgresql/15/main/pg_hba.conf + path: "/etc/postgresql/{{ pg_version.stdout }}/main/pg_hba.conf" insertafter: '^# "local" is for Unix domain socket' line: "host all all 127.0.0.1/32 scram-sha-256" notify: restart postgresql