diff --git a/roles/cmp-rdbms/templates/env/mariadb.env.j2 b/roles/cmp-rdbms/templates/env/mariadb.env.j2 index d68af557..a8d7ffb6 100644 --- a/roles/cmp-rdbms/templates/env/mariadb.env.j2 +++ b/roles/cmp-rdbms/templates/env/mariadb.env.j2 @@ -1,5 +1,5 @@ -MYSQL_DATABASE="{{database_name}}" -MYSQL_USER="{{database_username}}" -MYSQL_PASSWORD="{{database_password}}" -MYSQL_ROOT_PASSWORD="{{database_password}}" +MYSQL_DATABASE="{{ database_name }}" +MYSQL_USER="{{ database_username }}" +MYSQL_PASSWORD="{{ database_password }}" +MYSQL_ROOT_PASSWORD="{{ database_password }}" MARIADB_AUTO_UPGRADE="1" \ No newline at end of file diff --git a/roles/cmp-rdbms/templates/env/postgres.env.j2 b/roles/cmp-rdbms/templates/env/postgres.env.j2 index 6633a232..71857cfe 100644 --- a/roles/cmp-rdbms/templates/env/postgres.env.j2 +++ b/roles/cmp-rdbms/templates/env/postgres.env.j2 @@ -1,4 +1,4 @@ -POSTGRES_PASSWORD={{database_password}} -POSTGRES_USER={{database_username}} -POSTGRES_DB={{database_name}} +POSTGRES_PASSWORD={{ database_password }} +POSTGRES_USER={{ database_username }} +POSTGRES_DB={{ database_name }} POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C \ No newline at end of file diff --git a/roles/cmp-rdbms/templates/services/postgres.yml.j2 b/roles/cmp-rdbms/templates/services/postgres.yml.j2 index 23aea5d0..2c283572 100644 --- a/roles/cmp-rdbms/templates/services/postgres.yml.j2 +++ b/roles/cmp-rdbms/templates/services/postgres.yml.j2 @@ -8,7 +8,7 @@ - {{database_env}} restart: {{ DOCKER_RESTART_POLICY }} healthcheck: - test: ["CMD-SHELL", "pg_isready -U {{database_name}}"] + test: ["CMD-SHELL", "pg_isready -U {{ database_name }}"] interval: 10s timeout: 5s retries: 6 diff --git a/roles/cmp-rdbms/vars/database.yml b/roles/cmp-rdbms/vars/database.yml index cdfe9ce5..de1993d8 100644 --- a/roles/cmp-rdbms/vars/database.yml +++ b/roles/cmp-rdbms/vars/database.yml @@ -15,5 +15,5 @@ database_password: "{{ applications | get_app_conf(database_application_id, 'cr database_port: "{{ (ports.localhost.database[_database_id] | d('')) if _dbtype else '' }}" database_env: "{{docker_compose.directories.env}}{{ database_type }}.env" database_url_jdbc: "jdbc:{{ database_type if database_type == 'mariadb' else 'postgresql' }}://{{ database_host }}:{{ database_port }}/{{ database_name }}" -database_url_full: "{{ database_type }}://{{database_username}}:{{database_password}}@{{database_host}}:{{database_port}}/{{ database_name }}" +database_url_full: "{{ database_type }}://{{ database_username }}:{{ database_password }}@{{ database_host }}:{{database_port}}/{{ database_name }}" database_volume: "{{ _database_consumer_entity_name ~ '_' if not _database_central_enabled }}{{ database_host }}" diff --git a/roles/svc-db-mariadb/tasks/02_init.yml b/roles/svc-db-mariadb/tasks/02_init.yml index 359fd094..1c26285a 100644 --- a/roles/svc-db-mariadb/tasks/02_init.yml +++ b/roles/svc-db-mariadb/tasks/02_init.yml @@ -11,10 +11,10 @@ - name: "Create database user: {{ database_username }}" community.mysql.mysql_user: - name: "{{database_username}}" - password: "{{database_password}}" + name: "{{ database_username }}" + password: "{{ database_password }}" host: "%" - priv: '{{database_name}}.*:ALL' + priv: '{{ database_name }}.*:ALL' state: present login_user: root login_password: "{{mariadb_root_pwd}}" @@ -25,6 +25,6 @@ # @todo Remove if this works fine in the future. #- name: Grant database privileges # ansible.builtin.shell: -# cmd: "docker exec {{mariadb_name }} mariadb -u root -p{{ mariadb_root_pwd }} -e \"GRANT ALL PRIVILEGES ON `{{database_name}}`.* TO '{{database_username}}'@'%';\"" +# cmd: "docker exec {{mariadb_name }} mariadb -u root -p{{ mariadb_root_pwd }} -e \"GRANT ALL PRIVILEGES ON `{{ database_name }}`.* TO '{{ database_username }}'@'%';\"" # args: # executable: /bin/bash \ No newline at end of file diff --git a/roles/web-app-akaunting/templates/env.j2 b/roles/web-app-akaunting/templates/env.j2 index 823657b6..753d9491 100644 --- a/roles/web-app-akaunting/templates/env.j2 +++ b/roles/web-app-akaunting/templates/env.j2 @@ -3,12 +3,12 @@ APP_URL={{ domains | get_url(application_id, WEB_PROTOCOL) }} LOCALE={{ HOST_LL }} # Don't change this unless you rename your database container or use rootless podman, in case of using rootless podman you should set it to 127.0.0.1 (NOT localhost) -DB_HOST={{database_host}} +DB_HOST={{ database_host }} # Change these to match env/db.env -DB_DATABASE={{database_name}} -DB_USERNAME={{database_username}} -DB_PASSWORD={{database_password}} +DB_DATABASE={{ database_name }} +DB_USERNAME={{ database_username }} +DB_PASSWORD={{ database_password }} # You should change this to a random string of three numbers or letters followed by an underscore DB_PREFIX=asd_ diff --git a/roles/web-app-bigbluebutton/templates/env.j2 b/roles/web-app-bigbluebutton/templates/env.j2 index f153c0c0..490d0047 100644 --- a/roles/web-app-bigbluebutton/templates/env.j2 +++ b/roles/web-app-bigbluebutton/templates/env.j2 @@ -203,9 +203,9 @@ ALLOW_GREENLIGHT_ACCOUNTS=true # Emails are required for the basic features of Greenlight to function. # Please refer to your SMTP provider to get the values for the variables below -SMTP_SERVER={{system_email.host}} +SMTP_SERVER={{ system_email.host }} SMTP_DOMAIN={{system_email.domain}} -SMTP_PORT={{system_email.port}} +SMTP_PORT={{ system_email.port }} SMTP_USERNAME={{ users['no-reply'].email }} SMTP_PASSWORD={{ users['no-reply'].mailu_token }} SMTP_AUTH=plain diff --git a/roles/web-app-bluesky/templates/env.j2 b/roles/web-app-bluesky/templates/env.j2 index 4d5da7a8..5a95fcfc 100644 --- a/roles/web-app-bluesky/templates/env.j2 +++ b/roles/web-app-bluesky/templates/env.j2 @@ -8,7 +8,7 @@ PDS_JWT_SECRET="{{ bluesky_jwt_secret }}" PDS_ADMIN_PASSWORD="{{bluesky_admin_password}}" PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX="{{ bluesky_rotation_key }}" PDS_CRAWLERS=https://bsky.network -PDS_EMAIL_SMTP_URL=smtps://{{ users['no-reply'].email }}:{{ users['no-reply'].mailu_token }}@{{system_email.host}}:{{system_email.port}}/ +PDS_EMAIL_SMTP_URL=smtps://{{ users['no-reply'].email }}:{{ users['no-reply'].mailu_token }}@{{ system_email.host }}:{{ system_email.port }}/ PDS_EMAIL_FROM_ADDRESS={{ users['no-reply'].email }} LOG_ENABLED=true PDS_BLOBSTORE_DISK_LOCATION=/opt/pds/blocks diff --git a/roles/web-app-funkwhale/templates/env.j2 b/roles/web-app-funkwhale/templates/env.j2 index e330f8d6..126bb520 100644 --- a/roles/web-app-funkwhale/templates/env.j2 +++ b/roles/web-app-funkwhale/templates/env.j2 @@ -59,7 +59,7 @@ DJANGO_LOGLEVEL={% if MODE_DEBUG | bool %}debug{% else %}error{% endif %} # (returns `noreply%40youremail.host`) # EMAIL_CONFIG=smtp://user:password@youremail.host:25 # EMAIL_CONFIG=smtp+ssl://user:password@youremail.host:465 -EMAIL_CONFIG=smtp+tls://{{ users['no-reply'].username }}:{{ users['no-reply'].mailu_token }}@{{system_email.host}}:{{system_email.port}} +EMAIL_CONFIG=smtp+tls://{{ users['no-reply'].username }}:{{ users['no-reply'].mailu_token }}@{{ system_email.host }}:{{ system_email.port }} # Make e-mail verification mandatory before using the service # Doesn't apply to admins. diff --git a/roles/web-app-gitea/templates/env.j2 b/roles/web-app-gitea/templates/env.j2 index f4903edb..98701916 100644 --- a/roles/web-app-gitea/templates/env.j2 +++ b/roles/web-app-gitea/templates/env.j2 @@ -15,10 +15,10 @@ GITEA__log__LEVEL={% if MODE_DEBUG | bool %}Debug{% else %}Info{% endif %} # Database DB_TYPE=mysql -DB_HOST={{database_host}}:{{database_port}} -DB_NAME={{database_name}} -DB_USER={{database_username}} -DB_PASSWD={{database_password}} +DB_HOST={{ database_host }}:{{database_port}} +DB_NAME={{ database_name }} +DB_USER={{ database_username }} +DB_PASSWD={{ database_password }} # SSH SSH_PORT={{ports.public.ssh[application_id]}} diff --git a/roles/web-app-joomla/templates/env.j2 b/roles/web-app-joomla/templates/env.j2 index 05242b64..842a38ae 100644 --- a/roles/web-app-joomla/templates/env.j2 +++ b/roles/web-app-joomla/templates/env.j2 @@ -1,4 +1,4 @@ -JOOMLA_DB_HOST="{{database_host}}:{{database_port}}" -JOOMLA_DB_USER="{{database_username}}" -JOOMLA_DB_PASSWORD="{{database_password}}" -JOOMLA_DB_NAME="{{database_name}}" \ No newline at end of file +JOOMLA_DB_HOST="{{ database_host }}:{{database_port}}" +JOOMLA_DB_USER="{{ database_username }}" +JOOMLA_DB_PASSWORD="{{ database_password }}" +JOOMLA_DB_NAME="{{ database_name }}" \ No newline at end of file diff --git a/roles/web-app-keycloak/templates/env.j2 b/roles/web-app-keycloak/templates/env.j2 index 304d120a..1b130388 100644 --- a/roles/web-app-keycloak/templates/env.j2 +++ b/roles/web-app-keycloak/templates/env.j2 @@ -17,8 +17,8 @@ KEYCLOAK_ADMIN_PASSWORD= "{{applications | get_app_conf(application_id, ' # Database KC_DB= postgres KC_DB_URL= {{database_url_jdbc}} -KC_DB_USERNAME= {{database_username}} -KC_DB_PASSWORD= {{database_password}} +KC_DB_USERNAME= {{ database_username }} +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. KC_BOOTSTRAP_ADMIN_USERNAME= "{{applications | get_app_conf(application_id, 'users.administrator.username', True)}}" diff --git a/roles/web-app-keycloak/templates/import/realm.json.j2 b/roles/web-app-keycloak/templates/import/realm.json.j2 index 38e76524..fb3a4970 100644 --- a/roles/web-app-keycloak/templates/import/realm.json.j2 +++ b/roles/web-app-keycloak/templates/import/realm.json.j2 @@ -1681,9 +1681,9 @@ "replyToDisplayName": "", "starttls": "{{system_email.start_tls | lower}}", "auth": "true", - "port": "{{system_email.port}}", + "port": "{{ system_email.port }}", "replyTo": "", - "host": "{{system_email.host}}", + "host": "{{ system_email.host }}", "from": "{{ users['no-reply'].email }}", "fromDisplayName": "Keycloak Authentification System - {{domains | get_domain('web-app-keycloak')}}", "envelopeFrom": "", diff --git a/roles/web-app-listmonk/tasks/main.yml b/roles/web-app-listmonk/tasks/main.yml index c0fb1f29..9daf9bd4 100644 --- a/roles/web-app-listmonk/tasks/main.yml +++ b/roles/web-app-listmonk/tasks/main.yml @@ -19,7 +19,7 @@ - meta: flush_handlers - name: Check if listmonk database is already initialized - command: docker compose exec -T {{database_host}} psql -U {{database_username}} -d {{database_name}} -c "\dt" + command: docker compose exec -T {{ database_host }} psql -U {{ database_username }} -d {{ database_name }} -c "\dt" register: db_tables changed_when: false failed_when: false diff --git a/roles/web-app-listmonk/templates/config.toml.j2 b/roles/web-app-listmonk/templates/config.toml.j2 index 7ca6539b..d7281fb0 100644 --- a/roles/web-app-listmonk/templates/config.toml.j2 +++ b/roles/web-app-listmonk/templates/config.toml.j2 @@ -7,13 +7,13 @@ address = "0.0.0.0:{{ container_port }}" # Database. [db] -host = "{{database_host}}" +host = "{{ database_host }}" port = {{database_port}} -user = "{{database_username}}" -password = "{{database_password}}" +user = "{{ database_username }}" +password = "{{ database_password }}" # Ensure that this database has been created in Postgres. -database = "{{database_name}}" +database = "{{ database_name }}" ssl_mode = "disable" max_open = 25 diff --git a/roles/web-app-mailu/templates/env.j2 b/roles/web-app-mailu/templates/env.j2 index 371a437a..3f12a89d 100644 --- a/roles/web-app-mailu/templates/env.j2 +++ b/roles/web-app-mailu/templates/env.j2 @@ -141,8 +141,8 @@ LOG_LEVEL=WARNING ################################### # Database settings ################################### -SQLALCHEMY_DATABASE_URI_ROUNDCUBE=mysql://{{database_username}}:{{database_password}}@{{database_host}}/{{database_name}}?collation=utf8mb4_unicode_ci -SQLALCHEMY_DATABASE_URI=mysql+mysqlconnector://{{database_username}}:{{database_password}}@{{database_host}}/{{database_name}}?collation=utf8mb4_unicode_ci +SQLALCHEMY_DATABASE_URI_ROUNDCUBE=mysql://{{ database_username }}:{{ database_password }}@{{ database_host }}/{{ database_name }}?collation=utf8mb4_unicode_ci +SQLALCHEMY_DATABASE_URI=mysql+mysqlconnector://{{ database_username }}:{{ database_password }}@{{ database_host }}/{{ database_name }}?collation=utf8mb4_unicode_ci ################################### diff --git a/roles/web-app-mastodon/templates/env.j2 b/roles/web-app-mastodon/templates/env.j2 index 69bd4332..032f96eb 100644 --- a/roles/web-app-mastodon/templates/env.j2 +++ b/roles/web-app-mastodon/templates/env.j2 @@ -43,8 +43,8 @@ REDIS_HOST=redis REDIS_PORT=6379 REDIS_PASSWORD= -SMTP_SERVER={{system_email.host}} -SMTP_PORT={{system_email.port}} +SMTP_SERVER={{ system_email.host }} +SMTP_PORT={{ system_email.port }} SMTP_LOGIN={{ users['no-reply'].email }} SMTP_PASSWORD={{ users['no-reply'].mailu_token }} SMTP_AUTH_METHOD=plain diff --git a/roles/web-app-matrix/tasks/02_create-and-seed-database.yml b/roles/web-app-matrix/tasks/02_create-and-seed-database.yml index 8d8ae102..660b5ad7 100644 --- a/roles/web-app-matrix/tasks/02_create-and-seed-database.yml +++ b/roles/web-app-matrix/tasks/02_create-and-seed-database.yml @@ -4,7 +4,7 @@ # - database_name # - database_username # - database_password -- name: "create {{database_name}} database" +- name: "create {{ database_name }} database" include_role: name: "svc-db-{{ database_type }}" when: applications | get_app_conf(application_id, 'features.central_database', False) diff --git a/roles/web-app-matrix/templates/mautrix/facebook.config.yml.j2 b/roles/web-app-matrix/templates/mautrix/facebook.config.yml.j2 index 7d0e5f69..1e68cfb3 100644 --- a/roles/web-app-matrix/templates/mautrix/facebook.config.yml.j2 +++ b/roles/web-app-matrix/templates/mautrix/facebook.config.yml.j2 @@ -39,7 +39,7 @@ appservice: # Format examples: # SQLite: sqlite:filename.db # Postgres: postgres://username:password@hostname/dbname - database: postgres://mautrix_facebook_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_facebook_bridge_database_password', True)}}@{{database_host}}/mautrix_facebook_bridge + database: postgres://mautrix_facebook_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_facebook_bridge_database_password', True)}}@{{ database_host }}/mautrix_facebook_bridge # Additional arguments for asyncpg.create_pool() or sqlite3.connect() # https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool # https://docs.python.org/3/library/sqlite3.html#sqlite3.connect diff --git a/roles/web-app-matrix/templates/mautrix/instagram.config.yml.j2 b/roles/web-app-matrix/templates/mautrix/instagram.config.yml.j2 index 1a05e427..1a4380c1 100644 --- a/roles/web-app-matrix/templates/mautrix/instagram.config.yml.j2 +++ b/roles/web-app-matrix/templates/mautrix/instagram.config.yml.j2 @@ -42,7 +42,7 @@ appservice: # Format examples: # SQLite: sqlite:filename.db # Postgres: postgres://username:password@hostname/dbname - database: postgres://mautrix_instagram_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_instagram_bridge_database_password', True)}}@{{database_host}}/mautrix_instagram_bridge + database: postgres://mautrix_instagram_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_instagram_bridge_database_password', True)}}@{{ database_host }}/mautrix_instagram_bridge # Additional arguments for asyncpg.create_pool() or sqlite3.connect() # https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool # https://docs.python.org/3/library/sqlite3.html#sqlite3.connect diff --git a/roles/web-app-matrix/templates/mautrix/signal.config.yml.j2 b/roles/web-app-matrix/templates/mautrix/signal.config.yml.j2 index 43dbf421..41a8a289 100644 --- a/roles/web-app-matrix/templates/mautrix/signal.config.yml.j2 +++ b/roles/web-app-matrix/templates/mautrix/signal.config.yml.j2 @@ -43,7 +43,7 @@ appservice: # https://github.com/mattn/go-sqlite3#connection-string # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql - uri: postgres://mautrix_signal_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_signal_bridge_database_password', True)}}@{{database_host}}/mautrix_signal_bridge?sslmode=disable + uri: postgres://mautrix_signal_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_signal_bridge_database_password', True)}}@{{ database_host }}/mautrix_signal_bridge?sslmode=disable # Maximum number of connections. Mostly relevant for Postgres. max_open_conns: 20 max_idle_conns: 2 diff --git a/roles/web-app-matrix/templates/mautrix/slack.config.yml.j2 b/roles/web-app-matrix/templates/mautrix/slack.config.yml.j2 index 3e77355a..9d10c2c8 100644 --- a/roles/web-app-matrix/templates/mautrix/slack.config.yml.j2 +++ b/roles/web-app-matrix/templates/mautrix/slack.config.yml.j2 @@ -43,7 +43,7 @@ appservice: # https://github.com/mattn/go-sqlite3#connection-string # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql - uri: postgres://mautrix_slack_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_slack_bridge_database_password', True)}}@{{database_host}}/mautrix_slack_bridge?sslmode=disable + uri: postgres://mautrix_slack_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_slack_bridge_database_password', True)}}@{{ database_host }}/mautrix_slack_bridge?sslmode=disable # Maximum number of connections. Mostly relevant for Postgres. max_open_conns: 20 max_idle_conns: 2 diff --git a/roles/web-app-matrix/templates/mautrix/telegram.config.yml.j2 b/roles/web-app-matrix/templates/mautrix/telegram.config.yml.j2 index e9c9919b..1b687e79 100644 --- a/roles/web-app-matrix/templates/mautrix/telegram.config.yml.j2 +++ b/roles/web-app-matrix/templates/mautrix/telegram.config.yml.j2 @@ -42,7 +42,7 @@ appservice: # Format examples: # SQLite: sqlite:filename.db # Postgres: postgres://username:password@hostname/dbname - database: postgres://mautrix_telegram_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_telegram_bridge_database_password', True)}}@{{database_host}}/mautrix_telegram_bridge + database: postgres://mautrix_telegram_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_telegram_bridge_database_password', True)}}@{{ database_host }}/mautrix_telegram_bridge # Additional arguments for asyncpg.create_pool() or sqlite3.connect() # https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool # https://docs.python.org/3/library/sqlite3.html#sqlite3.connect diff --git a/roles/web-app-matrix/templates/mautrix/whatsapp.config.yml.j2 b/roles/web-app-matrix/templates/mautrix/whatsapp.config.yml.j2 index 76ca20c4..8a84c309 100644 --- a/roles/web-app-matrix/templates/mautrix/whatsapp.config.yml.j2 +++ b/roles/web-app-matrix/templates/mautrix/whatsapp.config.yml.j2 @@ -42,7 +42,7 @@ appservice: # https://github.com/mattn/go-sqlite3#connection-string # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql - uri: postgres://mautrix_whatsapp_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_whatsapp_bridge_database_password', True)}}@{{database_host}}/mautrix_whatsapp_bridge?sslmode=disable + uri: postgres://mautrix_whatsapp_bridge:{{applications | get_app_conf(application_id, 'credentials.mautrix_whatsapp_bridge_database_password', True)}}@{{ database_host }}/mautrix_whatsapp_bridge?sslmode=disable # Maximum number of connections. Mostly relevant for Postgres. max_open_conns: 20 max_idle_conns: 2 diff --git a/roles/web-app-matrix/templates/synapse/homeserver.yaml.j2 b/roles/web-app-matrix/templates/synapse/homeserver.yaml.j2 index a9c2170c..4100c170 100644 --- a/roles/web-app-matrix/templates/synapse/homeserver.yaml.j2 +++ b/roles/web-app-matrix/templates/synapse/homeserver.yaml.j2 @@ -12,18 +12,18 @@ listeners: database: name: psycopg2 args: - user: "{{database_username}}" - password: "{{database_password}}" - database: "{{database_name}}" - host: "{{database_host}}" + user: "{{ database_username }}" + password: "{{ database_password }}" + database: "{{ database_name }}" + host: "{{ database_host }}" cp_min: 5 cp_max: 10 log_config: "{{ MATRIX_SYNAPSE_LOG_PATH_CONTAINER }}" media_store_path: "/data/media_store" registration_shared_secret: "{{ MATRIX_REGISTRATION_SHARED_SECRET }}" report_stats: true -macaroon_secret_key: "{{applications | get_app_conf(application_id, 'credentials.macaroon_secret_key', True)}}" -form_secret: "{{applications | get_app_conf(application_id, 'credentials.form_secret', True)}}" +macaroon_secret_key: "{{ applications | get_app_conf(application_id, 'credentials.macaroon_secret_key') }}" +form_secret: "{{ applications | get_app_conf(application_id, 'credentials.form_secret') }}" signing_key_path: "/data/{{ MATRIX_SYNAPSE_DOMAIN }}.signing.key" web_client_location: "{{ WEB_PROTOCOL }}://{{domains[application_id].element}}" public_baseurl: "{{ MATRIX_SYNAPSE_URL }}" @@ -32,8 +32,8 @@ trusted_key_servers: admin_contact: 'mailto:{{ users.administrator.email }}' email: - smtp_host: "{{system_email.host}}" - smtp_port: "{{system_email.port}}" + smtp_host: "{{ system_email.host }}" + smtp_port: "{{ system_email.port }}" smtp_user: "{{ users['no-reply'].email }}" smtp_pass: "{{ users['no-reply'].mailu_token }}" #force_tls: true @@ -49,7 +49,7 @@ email: {% if applications | get_app_conf(application_id, 'features.oidc', False) %} # @See https://matrix-org.github.io/synapse/latest/openid.html oidc_providers: - - idp_id: keycloak + - idp_id: keycloak idp_name: "{{ oidc.button_text }}" issuer: "{{ oidc.client.issuer_url }}" client_id: "{{ oidc.client.id }}" diff --git a/roles/web-app-mobilizon/templates/env.j2 b/roles/web-app-mobilizon/templates/env.j2 index f2de0ebe..e7835b91 100644 --- a/roles/web-app-mobilizon/templates/env.j2 +++ b/roles/web-app-mobilizon/templates/env.j2 @@ -81,8 +81,8 @@ MOBILIZON_INSTANCE_SECRET_KEY={{ applications | get_app_conf(application_id, 'cr # The SMTP server # Defaults to localhost -MOBILIZON_SMTP_SERVER={{system_email.host}} -MOBILIZON_SMTP_PORT={{system_email.port}} +MOBILIZON_SMTP_SERVER={{ system_email.host }} +MOBILIZON_SMTP_PORT={{ system_email.port }} MOBILIZON_SMTP_USERNAME={{ users['no-reply'].email }} MOBILIZON_SMTP_PASSWORD={{ users['no-reply'].mailu_token }} diff --git a/roles/web-app-moodle/templates/env.j2 b/roles/web-app-moodle/templates/env.j2 index ba970385..ee3382d3 100644 --- a/roles/web-app-moodle/templates/env.j2 +++ b/roles/web-app-moodle/templates/env.j2 @@ -10,11 +10,11 @@ MOODLE_EMAIL={{applications | get_app_conf(application_id, 'users.administrator. BITNAMI_DEBUG={% if MODE_DEBUG | bool %}true{% else %}false{% endif %} # Database -MOODLE_DATABASE_HOST={{database_host}} +MOODLE_DATABASE_HOST={{ database_host }} MOODLE_DATABASE_PORT_NUMBER={{database_port}} -MOODLE_DATABASE_USER={{database_username}} -MOODLE_DATABASE_NAME={{database_name}} -MOODLE_DATABASE_PASSWORD={{database_password}} +MOODLE_DATABASE_USER={{ database_username }} +MOODLE_DATABASE_NAME={{ database_name }} +MOODLE_DATABASE_PASSWORD={{ database_password }} # SMTP MOODLE_SMTP_HOST={{ system_email.host }} diff --git a/roles/web-app-nextcloud/templates/env.j2 b/roles/web-app-nextcloud/templates/env.j2 index dee5082d..d3541cfa 100644 --- a/roles/web-app-nextcloud/templates/env.j2 +++ b/roles/web-app-nextcloud/templates/env.j2 @@ -2,10 +2,10 @@ # @See https://github.com/nextcloud/docker/blob/master/README.md # Database Configuration -MYSQL_DATABASE= "{{database_name}}" -MYSQL_USER= "{{database_username}}" -MYSQL_PASSWORD= "{{database_password}}" -MYSQL_HOST= "{{database_host}}:{{database_port}}" +MYSQL_DATABASE= "{{ database_name }}" +MYSQL_USER= "{{ database_username }}" +MYSQL_PASSWORD= "{{ database_password }}" +MYSQL_HOST= "{{ database_host }}:{{database_port}}" # PHP PHP_MEMORY_LIMIT= "{{applications | get_app_conf(application_id, 'performance.php.memory_limit')}}" @@ -13,9 +13,9 @@ PHP_UPLOAD_LIMIT= "{{applications | get_app_conf(application_id, ' PHP_OPCACHE_MEMORY_CONSUMPTION= "{{applications | get_app_conf(application_id, 'performance.php.opcache_memory_consumption')}}" # Email Configuration -SMTP_HOST= {{system_email.host}} +SMTP_HOST= {{ system_email.host }} SMTP_SECURE= {{ 'ssl' if system_email.tls else '' }} -SMTP_PORT= {{system_email.port}} +SMTP_PORT= {{ system_email.port }} SMTP_NAME= {{ users['no-reply'].email }} SMTP_PASSWORD= {{ users['no-reply'].mailu_token }} diff --git a/roles/web-app-peertube/templates/env.j2 b/roles/web-app-peertube/templates/env.j2 index bc412fd3..7c505602 100644 --- a/roles/web-app-peertube/templates/env.j2 +++ b/roles/web-app-peertube/templates/env.j2 @@ -1,11 +1,11 @@ # Database / Postgres service configuration -POSTGRES_USER={{database_username}} -POSTGRES_PASSWORD={{database_password}} -POSTGRES_DB={{database_name}} -PEERTUBE_DB_USERNAME={{database_username}} -PEERTUBE_DB_PASSWORD={{database_password}} +POSTGRES_USER={{ database_username }} +POSTGRES_PASSWORD={{ database_password }} +POSTGRES_DB={{ database_name }} +PEERTUBE_DB_USERNAME={{ database_username }} +PEERTUBE_DB_PASSWORD={{ database_password }} PEERTUBE_DB_SSL=false -PEERTUBE_DB_HOSTNAME={{database_host}} +PEERTUBE_DB_HOSTNAME={{ database_host }} # PeerTube server configuration PEERTUBE_WEBSERVER_HOSTNAME={{ domains | get_domain(application_id) }} @@ -16,8 +16,8 @@ PEERTUBE_SECRET={{applications | get_app_conf(application_id, 'credentials.secre # E-mail configuration PEERTUBE_SMTP_USERNAME={{ users['no-reply'].email }} PEERTUBE_SMTP_PASSWORD={{ users['no-reply'].mailu_token }} -PEERTUBE_SMTP_HOSTNAME={{system_email.host}} -PEERTUBE_SMTP_PORT={{system_email.port}} +PEERTUBE_SMTP_HOSTNAME={{ system_email.host }} +PEERTUBE_SMTP_PORT={{ system_email.port }} PEERTUBE_SMTP_FROM={{ users['no-reply'].email }} PEERTUBE_SMTP_TLS={{ system_email.tls | lower }} PEERTUBE_SMTP_DISABLE_STARTTLS={{ 'false' if system_email.start_tls else 'true' }} diff --git a/roles/web-app-pixelfed/templates/env.j2 b/roles/web-app-pixelfed/templates/env.j2 index 96654784..cba88760 100644 --- a/roles/web-app-pixelfed/templates/env.j2 +++ b/roles/web-app-pixelfed/templates/env.j2 @@ -46,8 +46,8 @@ RESTRICTED_INSTANCE=false ## Mail MAIL_DRIVER=log -MAIL_HOST={{system_email.host}} -MAIL_PORT={{system_email.port}} +MAIL_HOST={{ system_email.host }} +MAIL_PORT={{ system_email.port }} MAIL_FROM_ADDRESS="{{ users['no-reply'].email }}" MAIL_FROM_NAME={{ service_provider.company.titel }} - Pixelfed MAIL_USERNAME={{ users['no-reply'].email }} @@ -58,11 +58,11 @@ MAIL_ENCRYPTION={{ 'ssl' if system_email.start_tls else 'tls' }} ## Databases (MySQL) DB_CONNECTION=mysql -DB_DATABASE={{database_name}} -DB_HOST={{database_host}} -DB_PASSWORD="{{database_password}}" +DB_DATABASE={{ database_name }} +DB_HOST={{ database_host }} +DB_PASSWORD="{{ database_password }}" DB_PORT="{{database_port}}" -DB_USERNAME={{database_username}} +DB_USERNAME={{ database_username }} ## Cache (Redis) REDIS_CLIENT=phpredis diff --git a/roles/web-app-snipe-it/templates/env.j2 b/roles/web-app-snipe-it/templates/env.j2 index 70909d41..463bb8c1 100644 --- a/roles/web-app-snipe-it/templates/env.j2 +++ b/roles/web-app-snipe-it/templates/env.j2 @@ -20,14 +20,14 @@ PUBLIC_FILESYSTEM_DISK=local_public # REQUIRED: DATABASE SETTINGS # -------------------------------------------- DB_CONNECTION=mysql -DB_HOST={{database_host}} +DB_HOST={{ database_host }} DB_PORT={{database_port}} -DB_DATABASE={{database_name}} -DB_USERNAME={{database_username}} -DB_PASSWORD={{database_password}} +DB_DATABASE={{ database_name }} +DB_USERNAME={{ database_username }} +DB_PASSWORD={{ database_password }} {% if not applications | get_app_conf(application_id, 'features.central_database', False)%} -MYSQL_ROOT_PASSWORD={{database_password}} +MYSQL_ROOT_PASSWORD={{ database_password }} DB_PREFIX=null DB_DUMP_PATH='/usr/bin' DB_CHARSET=utf8mb4 @@ -48,8 +48,8 @@ DB_SSL_VERIFY_SERVER=null # REQUIRED: OUTGOING MAIL SERVER SETTINGS # -------------------------------------------- MAIL_MAILER = smtp -MAIL_HOST = {{system_email.host}} -MAIL_PORT = {{system_email.port}} +MAIL_HOST = {{ system_email.host }} +MAIL_PORT = {{ system_email.port }} MAIL_USERNAME = {{ users['no-reply'].email }} MAIL_PASSWORD = {{ users['no-reply'].mailu_token }} MAIL_TLS_VERIFY_PEER = {{ system_email.tls | capitalize }} diff --git a/roles/web-app-taiga/templates/env.j2 b/roles/web-app-taiga/templates/env.j2 index bdeb6639..6a2dd6c3 100644 --- a/roles/web-app-taiga/templates/env.j2 +++ b/roles/web-app-taiga/templates/env.j2 @@ -10,15 +10,15 @@ TAIGA_SECRET_KEY = "{{applications | get_app_conf(application_id, 'credenti SECRET_KEY = "{{applications | get_app_conf(application_id, 'credentials.secret_key', True)}}" # Taiga's Database settings - Variables to create the Taiga database and connect to it -POSTGRES_USER = "{{database_username}}" # user to connect to PostgreSQL -POSTGRES_PASSWORD = "{{database_password}}" # database user's password -POSTGRES_DB = "{{database_name}}" -POSTGRES_HOST = "{{database_host}}" +POSTGRES_USER = "{{ database_username }}" # user to connect to PostgreSQL +POSTGRES_PASSWORD = "{{ database_password }}" # database user's password +POSTGRES_DB = "{{ database_name }}" +POSTGRES_HOST = "{{ database_host }}" # Taiga's SMTP settings - Variables to send Taiga's emails to the users EMAIL_BACKEND = "{{email_backend}}" # use an SMTP server or display the emails in the console (either "smtp" or "console") -EMAIL_HOST = "{{system_email.host}}" # SMTP server address -EMAIL_PORT = "{{system_email.port}}" # default SMTP port +EMAIL_HOST = "{{ system_email.host }}" # SMTP server address +EMAIL_PORT = "{{ system_email.port }}" # default SMTP port EMAIL_HOST_USER = "{{ users['no-reply'].email }}" # user to connect the SMTP server EMAIL_HOST_PASSWORD = "{{ users['no-reply'].mailu_token }}" # SMTP user's password EMAIL_DEFAULT_FROM = "{{ users['no-reply'].email }}" # default email address for the automated emails diff --git a/roles/web-app-wordpress/templates/env.j2 b/roles/web-app-wordpress/templates/env.j2 index da90d3a0..134b0017 100644 --- a/roles/web-app-wordpress/templates/env.j2 +++ b/roles/web-app-wordpress/templates/env.j2 @@ -1,7 +1,7 @@ -WORDPRESS_DB_HOST= "{{database_host}}:{{database_port}}" -WORDPRESS_DB_USER= "{{database_username}}" -WORDPRESS_DB_PASSWORD= "{{database_password}}" -WORDPRESS_DB_NAME= "{{database_name}}" +WORDPRESS_DB_HOST= "{{ database_host }}:{{database_port}}" +WORDPRESS_DB_USER= "{{ database_username }}" +WORDPRESS_DB_PASSWORD= "{{ database_password }}" +WORDPRESS_DB_NAME= "{{ database_name }}" # Debug flags WP_DEBUG={{ MODE_DEBUG | lower }}