From 09ae7c36f1cbebce3c5401d6529f37b062131170 Mon Sep 17 00:00:00 2001 From: Bas Meijer Date: Wed, 27 Nov 2024 15:59:04 +0100 Subject: [PATCH] postgres_listen_addresses --- inventory/local/group_vars/all.yml | 1 + inventory/local/group_vars/database.yml | 1 - inventory/local/group_vars/semaphore.yml | 1 - inventory/test/group_vars/all.yml | 1 + inventory/test/group_vars/database.yml | 1 - roles/semaphore/defaults/main.yml | 2 +- 6 files changed, 3 insertions(+), 4 deletions(-) diff --git a/inventory/local/group_vars/all.yml b/inventory/local/group_vars/all.yml index 0149842..5e00c0c 100644 --- a/inventory/local/group_vars/all.yml +++ b/inventory/local/group_vars/all.yml @@ -2,3 +2,4 @@ docker_install_compose: true docker_install_compose_plugin: true server_name: "{{ lookup('env', 'HOSTNAME') }}" +postgres_listen_addresses: '127.0.0.1' diff --git a/inventory/local/group_vars/database.yml b/inventory/local/group_vars/database.yml index 9ae5c84..07ab13b 100644 --- a/inventory/local/group_vars/database.yml +++ b/inventory/local/group_vars/database.yml @@ -1,7 +1,6 @@ --- postgres_enabled: true postgres_version: 15 -postgres_listen_addresses: '127.0.0.1' # Postgresql users and databases/schemas database: postgres: diff --git a/inventory/local/group_vars/semaphore.yml b/inventory/local/group_vars/semaphore.yml index 1aa3657..1303adf 100644 --- a/inventory/local/group_vars/semaphore.yml +++ b/inventory/local/group_vars/semaphore.yml @@ -1,6 +1,5 @@ --- semaphore_web_root: 'https://20.224.75.82' -semaphore_db_host: '127.0.0.1' nginx_add_repo: false ssh_passphrase: "{{ lookup('env', 'SSH_PASS') }}" diff --git a/inventory/test/group_vars/all.yml b/inventory/test/group_vars/all.yml index f4768a6..665e38b 100644 --- a/inventory/test/group_vars/all.yml +++ b/inventory/test/group_vars/all.yml @@ -2,3 +2,4 @@ docker_install_compose: true docker_install_compose_plugin: true server_name: acsNode +postgres_listen_addresses: '127.0.0.1' diff --git a/inventory/test/group_vars/database.yml b/inventory/test/group_vars/database.yml index 9ae5c84..07ab13b 100644 --- a/inventory/test/group_vars/database.yml +++ b/inventory/test/group_vars/database.yml @@ -1,7 +1,6 @@ --- postgres_enabled: true postgres_version: 15 -postgres_listen_addresses: '127.0.0.1' # Postgresql users and databases/schemas database: postgres: diff --git a/roles/semaphore/defaults/main.yml b/roles/semaphore/defaults/main.yml index cc03d9c..836d813 100644 --- a/roles/semaphore/defaults/main.yml +++ b/roles/semaphore/defaults/main.yml @@ -6,7 +6,7 @@ verify_state: true debug: false semaphore_config_path: config.json.j2 semaphore_port: 3000 -semaphore_db_host: "{{ ansible_default_ipv4.address }}" +semaphore_db_host: "{{ postgres_listen_addresses }}" bind_port: 3000 semaphore_service_uri: "https://{{ ansible_fqdn | default(ansible_hostname) }}" # Whether to create an admin user