Compare commits

..

6 Commits

10 changed files with 28 additions and 23 deletions

View File

@@ -18,7 +18,10 @@ class FilterModule(object):
seen_domains = {} seen_domains = {}
for app_id, cfg in apps.items(): for app_id, cfg in apps.items():
if app_id.startswith(("web-")): if app_id.startswith((
"web-",
"svc-db-" # Database services can also be exposed to the internet. It is just listening to the port, but the domain is used for port mapping
)):
if not isinstance(cfg, dict): if not isinstance(cfg, dict):
raise AnsibleFilterError( raise AnsibleFilterError(
f"Invalid configuration for application '{app_id}': " f"Invalid configuration for application '{app_id}': "

View File

@@ -4,3 +4,6 @@ bcrypt
ruamel.yaml ruamel.yaml
tld tld
passlib passlib
requests
ansible
pytest

View File

@@ -1,10 +1,5 @@
collections: collections:
- name: kewlfft.aur - name: kewlfft.aur
- name: community.general - name: community.general
pacman:
# Propably it makes sense to move the following to the requirements.txt to just install it in the python venv
- ansible
- python-passlib
- python-pytest
yay: yay:
- python-simpleaudio - python-simpleaudio

View File

@@ -1,6 +1,6 @@
# run_once_cmp_docker_proxy: deactivated # run_once_cmp_docker_proxy: deactivated
# To load the proxy firs is just implemented due to some issues with BBB # To load the proxy first is just implemented due to some issues with BBB
- name: "For '{{ application_id }}': include role srv-proxy-6-6-domain" - name: "For '{{ application_id }}': include role srv-proxy-6-6-domain"
include_role: include_role:
name: srv-proxy-6-6-domain name: srv-proxy-6-6-domain

View File

@@ -1,18 +1,10 @@
--- ---
- name: "Store 'application_id' : {{ application_id }}"
set_fact:
original_application_id: "{{ application_id }}"
when: run_once_srv_web_core is not defined
- name: Include openresty - name: Include openresty
include_role: include_role:
name: svc-prx-openresty name: svc-prx-openresty
when: run_once_srv_web_core is not defined public: false
# Explicit set to guaranty that application_id will not be overwritten.
- name: "Restore 'application_id':\n Current: {{ application_id }}\n Restored: {{ original_application_id }}" # Should be anyhow the default case
set_fact:
application_id: "{{ original_application_id }}"
when: run_once_srv_web_core is not defined when: run_once_srv_web_core is not defined
- name: "reset (if enabled)" - name: "reset (if enabled)"

View File

@@ -4,6 +4,9 @@ application_id: svc-db-postgres
# Docker # Docker
docker_compose_flush_handlers: true docker_compose_flush_handlers: true
# Docker Compose
database_type: "{{ application_id | get_entity_name }}"
## Postgres ## Postgres
postgres_volume: "{{ applications | get_app_conf(application_id, 'docker.volumes.data', True) }}" postgres_volume: "{{ applications | get_app_conf(application_id, 'docker.volumes.data', True) }}"
postgres_name: "{{ applications | get_app_conf(application_id, 'docker.services.postgres.name', True) }}" postgres_name: "{{ applications | get_app_conf(application_id, 'docker.services.postgres.name', True) }}"

View File

@@ -1,7 +1,7 @@
import_realm: True # If True realm will be imported. If false skip. import_realm: True # If True realm will be imported. If false skip.
features: features:
matomo: true matomo: true
css: false css: true
port-ui-desktop: true port-ui-desktop: true
ldap: true ldap: true
central_database: true central_database: true

View File

@@ -23,3 +23,9 @@ KC_DB_PASSWORD= {{database_password}}
# If the initial administrator already exists and the environment variables are still present at startup, an error message stating the failed creation of the initial administrator is shown in the logs. Keycloak ignores the values and starts up correctly. # If the initial administrator already exists and the environment variables are still present at startup, an error message stating the failed creation of the initial administrator is shown in the logs. Keycloak ignores the values and starts up correctly.
KC_BOOTSTRAP_ADMIN_USERNAME= "{{applications | get_app_conf(application_id, 'users.administrator.username', True)}}" KC_BOOTSTRAP_ADMIN_USERNAME= "{{applications | get_app_conf(application_id, 'users.administrator.username', True)}}"
KC_BOOTSTRAP_ADMIN_PASSWORD= "{{applications | get_app_conf(application_id, 'credentials.administrator_password', True)}}" KC_BOOTSTRAP_ADMIN_PASSWORD= "{{applications | get_app_conf(application_id, 'credentials.administrator_password', True)}}"
# Enable detailed logs
{% if enable_debug | bool %}
KC_LOG_LEVEL=DEBUG
KC_LOG_CONSOLE_ENABLED=true
{% endif %}

View File

@@ -1,6 +1,9 @@
--- ---
# General
application_id: "web-app-matomo" application_id: "web-app-matomo"
database_type: "mariadb" database_type: "mariadb"
# Matomo
matomo_excluded_ips: "{{ applications | get_app_conf(application_id, 'excluded_ips', True) }}" matomo_excluded_ips: "{{ applications | get_app_conf(application_id, 'excluded_ips', True) }}"
matomo_index_php_url: "{{ domains | get_url(application_id, web_protocol) }}/index.php" matomo_index_php_url: "{{ domains | get_url(application_id, web_protocol) }}/index.php"
matomo_auth_token: "{{ applications | get_app_conf(application_id, 'credentials.auth_token', True) }}" matomo_auth_token: "{{ applications | get_app_conf(application_id, 'credentials.auth_token', True) }}"