mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-22 00:01:09 +02:00
Changed pgadmin to web-app-pgadmin
This commit is contained in:
parent
f3aa7625fe
commit
7e58b825ea
@ -13,7 +13,7 @@ ports:
|
||||
web-app-lam: 4182
|
||||
web-app-openproject: 4183
|
||||
web-app-yourls: 4184
|
||||
pgadmin: 4185
|
||||
web-app-pgadmin: 4185
|
||||
phpldapadmin: 4186
|
||||
fusiondirectory: 4187
|
||||
web-app-gitea: 4188
|
||||
@ -37,7 +37,7 @@ ports:
|
||||
roulette-wheel: 8013
|
||||
web-app-joomla: 8014
|
||||
attendize: 8015
|
||||
pgadmin: 8016
|
||||
web-app-pgadmin: 8016
|
||||
web-app-baserow: 8017
|
||||
web-app-matomo: 8018
|
||||
web-app-listmonk: 8019
|
||||
|
@ -60,7 +60,7 @@ defaults_networks:
|
||||
subnet: 192.168.102.112/28
|
||||
web-app-pixelfed:
|
||||
subnet: 192.168.102.128/28
|
||||
pgadmin:
|
||||
web-app-pgadmin:
|
||||
subnet: 192.168.102.144/28
|
||||
web-app-snipe-it:
|
||||
subnet: 192.168.102.160/28
|
||||
|
@ -1,4 +1,4 @@
|
||||
application_id: "pgadmin"
|
||||
application_id: "web-app-pgadmin"
|
||||
database_type: "postgres"
|
||||
database_host: "{{ applications | get_app_conf('svc-db-postgres', 'docker.services.postgres.name', True) if applications | get_app_conf(application_id, 'features.central_database', False) }}"
|
||||
pgadmin_user: 5050
|
||||
|
@ -1,7 +1,6 @@
|
||||
import os
|
||||
import unittest
|
||||
import yaml
|
||||
import warnings
|
||||
|
||||
# Dynamically determine the path to the roles directory
|
||||
ROLES_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'roles'))
|
||||
@ -10,7 +9,10 @@ class TestApplicationIdDeprecation(unittest.TestCase):
|
||||
def test_application_id_matches_role_name(self):
|
||||
"""
|
||||
Deprecation: application_id in vars/main.yml must match the role name.
|
||||
This test fails if any role violates this rule, listing all violations.
|
||||
"""
|
||||
errors = []
|
||||
|
||||
for role in os.listdir(ROLES_DIR):
|
||||
role_path = os.path.join(ROLES_DIR, role)
|
||||
vars_main_yml = os.path.join(role_path, 'vars', 'main.yml')
|
||||
@ -20,17 +22,23 @@ class TestApplicationIdDeprecation(unittest.TestCase):
|
||||
try:
|
||||
data = yaml.safe_load(f)
|
||||
except Exception as e:
|
||||
self.fail(f"Could not parse {vars_main_yml}: {e}")
|
||||
errors.append(f"Could not parse {vars_main_yml}: {e}")
|
||||
continue
|
||||
if not isinstance(data, dict):
|
||||
continue
|
||||
app_id = data.get('application_id')
|
||||
if app_id is not None and app_id != role:
|
||||
warnings.warn(
|
||||
f"[DEPRECATION WARNING] application_id '{app_id}' in {vars_main_yml} "
|
||||
f"does not match its role directory '{role}'.\n"
|
||||
f"Please update 'application_id' to match the role name for future compatibility.",
|
||||
DeprecationWarning
|
||||
errors.append(
|
||||
f"[DEPRECATION] application_id '{app_id}' in {vars_main_yml} "
|
||||
f"does not match its role directory '{role}'."
|
||||
)
|
||||
|
||||
if errors:
|
||||
self.fail(
|
||||
"application_id mismatch found in one or more roles:\n\n" +
|
||||
"\n".join(errors) +
|
||||
"\n\nPlease update 'application_id' to match the role name for future compatibility."
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user