mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-06-25 19:55:31 +02:00
Compare commits
6 Commits
82f442f40e
...
8ae99aaf46
Author | SHA1 | Date | |
---|---|---|---|
8ae99aaf46 | |||
27bfee2438 | |||
e7c193f409 | |||
0d8027c908 | |||
a2e6c9881a | |||
5b47333955 |
9
Makefile
9
Makefile
@ -1,12 +1,11 @@
|
|||||||
# Makefile for j2render
|
ROLES_DIR=./roles
|
||||||
|
|
||||||
TEMPLATE=./templates/vars/applications.yml.j2
|
|
||||||
OUTPUT=./group_vars/all/11_applications.yml
|
OUTPUT=./group_vars/all/11_applications.yml
|
||||||
|
SCRIPT=./cli/generate_defaults_applications.py
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@echo "🔧 Building rendered file from $(TEMPLATE)..."
|
@echo "🔧 Generating $(OUTPUT) from roles in $(ROLES_DIR)..."
|
||||||
@mkdir -p $(dir $(OUTPUT))
|
@mkdir -p $(dir $(OUTPUT))
|
||||||
j2r $(TEMPLATE) $(OUTPUT)
|
python3 $(SCRIPT) --roles-dir $(ROLES_DIR) --output-file $(OUTPUT)
|
||||||
@echo "✅ Output written to $(OUTPUT)"
|
@echo "✅ Output written to $(OUTPUT)"
|
||||||
|
|
||||||
install: build
|
install: build
|
||||||
|
0
cli/__init__.py
Normal file
0
cli/__init__.py
Normal file
36
cli/fix_tabs.py
Normal file
36
cli/fix_tabs.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
ROLES_DIR = Path("roles") # Adjust this if needed
|
||||||
|
FILES_FIXED = []
|
||||||
|
|
||||||
|
def fix_tabs_in_file(file_path):
|
||||||
|
with open(file_path, "r") as f:
|
||||||
|
lines = f.readlines()
|
||||||
|
|
||||||
|
if any('\t' in line for line in lines):
|
||||||
|
fixed_lines = [line.replace('\t', ' ') for line in lines]
|
||||||
|
with open(file_path, "w") as f:
|
||||||
|
f.writelines(fixed_lines)
|
||||||
|
FILES_FIXED.append(str(file_path))
|
||||||
|
|
||||||
|
def main():
|
||||||
|
for role_dir in sorted(ROLES_DIR.iterdir()):
|
||||||
|
if not role_dir.is_dir():
|
||||||
|
continue
|
||||||
|
|
||||||
|
vars_main = role_dir / "vars" / "main.yml"
|
||||||
|
if vars_main.exists():
|
||||||
|
fix_tabs_in_file(vars_main)
|
||||||
|
|
||||||
|
if FILES_FIXED:
|
||||||
|
print("✅ Fixed tab characters in the following files:")
|
||||||
|
for f in FILES_FIXED:
|
||||||
|
print(f" - {f}")
|
||||||
|
else:
|
||||||
|
print("✅ No tabs found in any vars/main.yml files.")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
62
cli/generate_defaults_applications.py
Normal file
62
cli/generate_defaults_applications.py
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import os
|
||||||
|
import yaml
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
def load_yaml_file(path):
|
||||||
|
"""Load a YAML file if it exists, otherwise return an empty dict."""
|
||||||
|
if not path.exists():
|
||||||
|
return {}
|
||||||
|
with path.open("r", encoding="utf-8") as f:
|
||||||
|
return yaml.safe_load(f) or {}
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(description="Generate defaults_applications YAML from docker roles.")
|
||||||
|
parser.add_argument("--roles-dir", default="roles", help="Path to the roles directory (default: roles)")
|
||||||
|
parser.add_argument("--output-file", default="group_vars/all/11_applications.yml", help="Path to output YAML file")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
cwd = Path.cwd()
|
||||||
|
roles_dir = (cwd / args.roles_dir).resolve()
|
||||||
|
output_file = (cwd / args.output_file).resolve()
|
||||||
|
|
||||||
|
output_file.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
result = {"defaults_applications": {}}
|
||||||
|
|
||||||
|
for role_dir in sorted(roles_dir.iterdir()):
|
||||||
|
role_name = role_dir.name
|
||||||
|
vars_main = role_dir / "vars" / "main.yml"
|
||||||
|
config_file = role_dir / "vars" / "configuration.yml"
|
||||||
|
|
||||||
|
if not vars_main.exists():
|
||||||
|
print(f"[!] Skipping {role_name}: vars/main.yml missing")
|
||||||
|
continue
|
||||||
|
|
||||||
|
vars_data = load_yaml_file(vars_main)
|
||||||
|
application_id = vars_data.get("application_id")
|
||||||
|
|
||||||
|
if not application_id:
|
||||||
|
print(f"[!] Skipping {role_name}: application_id not defined in vars/main.yml")
|
||||||
|
continue
|
||||||
|
|
||||||
|
if not config_file.exists():
|
||||||
|
print(f"[!] Skipping {role_name}: vars/configuration.yml missing")
|
||||||
|
continue
|
||||||
|
|
||||||
|
config_data = load_yaml_file(config_file)
|
||||||
|
if config_data:
|
||||||
|
result["defaults_applications"][application_id] = config_data
|
||||||
|
|
||||||
|
with output_file.open("w", encoding="utf-8") as f:
|
||||||
|
yaml.dump(result, f, sort_keys=False)
|
||||||
|
|
||||||
|
try:
|
||||||
|
print(f"✅ Generated: {output_file.relative_to(cwd)}")
|
||||||
|
except ValueError:
|
||||||
|
print(f"✅ Generated: {output_file}")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
@ -48,3 +48,9 @@ certbot_dns_propagation_wait_seconds: 40 # How long sho
|
|||||||
certbot_flavor: san # Possible options: san (recommended, with a dns flavor like cloudflare, or hetzner), wildcard(doesn't function with www redirect), deicated
|
certbot_flavor: san # Possible options: san (recommended, with a dns flavor like cloudflare, or hetzner), wildcard(doesn't function with www redirect), deicated
|
||||||
certbot_webroot_path: "/var/lib/letsencrypt/" # Path used by Certbot to serve HTTP-01 ACME challenges
|
certbot_webroot_path: "/var/lib/letsencrypt/" # Path used by Certbot to serve HTTP-01 ACME challenges
|
||||||
certbot_cert_path: "/etc/letsencrypt/live" # Path containing active certificate symlinks for domains
|
certbot_cert_path: "/etc/letsencrypt/live" # Path containing active certificate symlinks for domains
|
||||||
|
|
||||||
|
## Docker Role Specific Parameters
|
||||||
|
docker_restart_policy: "unless-stopped"
|
||||||
|
|
||||||
|
# helper
|
||||||
|
_applications_nextcloud_oidc_flavor: "{{ applications.nextcloud.oidc.flavor | default('oidc_login' if applications.nextcloud.features.ldap | default(true) else 'sociallogin') }}"
|
@ -4,5 +4,3 @@ collections:
|
|||||||
pacman:
|
pacman:
|
||||||
- ansible
|
- ansible
|
||||||
- python-passlib
|
- python-passlib
|
||||||
pkgmgr:
|
|
||||||
- j2r
|
|
@ -5,6 +5,8 @@
|
|||||||
msg: |
|
msg: |
|
||||||
database_instance: "{{ database_instance | default('undefined') }}"
|
database_instance: "{{ database_instance | default('undefined') }}"
|
||||||
database_name: "{{ database_name | default('undefined') }}"
|
database_name: "{{ database_name | default('undefined') }}"
|
||||||
|
database_type: "{{ database_type | default('undefined') }}"
|
||||||
|
database_host: "{{ database_host | default('undefined') }}"
|
||||||
database_username: "{{ database_username | default('undefined') }}"
|
database_username: "{{ database_username | default('undefined') }}"
|
||||||
database_password: "{{ database_password | default('undefined') }}"
|
database_password: "{{ database_password | default('undefined') }}"
|
||||||
when: enable_debug | bool
|
when: enable_debug | bool
|
||||||
|
23
roles/client-browser-chromium/templates/configuration.yml.j2
Normal file
23
roles/client-browser-chromium/templates/configuration.yml.j2
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Concerning configuration options checkout:
|
||||||
|
# https://chromeenterprise.google/policies/#ExtensionSettings
|
||||||
|
chromium:
|
||||||
|
password_manager_enabled: false
|
||||||
|
default_installation_mode: allowed
|
||||||
|
plugins:
|
||||||
|
# UBlock Origin
|
||||||
|
- id: "cjpalhdlnbpafiamejdnhcphjbkeiagm"
|
||||||
|
update_url: "https://clients2.google.com/service/update2/crx"
|
||||||
|
incognito: true
|
||||||
|
installation_mode: "force_installed"
|
||||||
|
|
||||||
|
# KeepassXC
|
||||||
|
- id: "ddkjiahejlhfcafbddmgiahcphecmpfh"
|
||||||
|
update_url: "https://clients2.google.com/service/update2/crx"
|
||||||
|
incognito: false
|
||||||
|
installation_mode: "force_installed"
|
||||||
|
|
||||||
|
# Dark Mode Extension
|
||||||
|
- id: "dmghijelimhndkbmpgbldicpogfkceaj"
|
||||||
|
update_url: "https://clients2.google.com/service/update2/crx"
|
||||||
|
incognito: true
|
||||||
|
installation_mode: "force_installed"
|
@ -1,8 +1,20 @@
|
|||||||
{
|
{
|
||||||
"ExtensionInstallForcelist": [
|
"ExtensionInstallForcelist": [
|
||||||
{% for plugin in applications[application_id].plugins -%}
|
{% for plugin in applications[application_id].chromium.plugins -%}
|
||||||
"{{ plugin }}"{% if not loop.last %},{% endif %}
|
"{{ plugin.id }};{{ plugin.update_url }}"{% if not loop.last %},{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
],
|
],
|
||||||
"PasswordManagerEnabled": false
|
"ExtensionSettings": {
|
||||||
|
"*": {
|
||||||
|
"installation_mode": "{{ applications[application_id].default_installation_mode }}"
|
||||||
|
}
|
||||||
|
{% for plugin in applications[application_id].chromium.plugins -%},
|
||||||
|
"{{ plugin.id }}": {
|
||||||
|
"installation_mode": "{{ plugin.installation_mode }}",
|
||||||
|
"update_url": "{{ plugin.update_url }}",
|
||||||
|
"incognito_mode": "{{ 'enabled' if plugin.incognito else 'disabled' }}"
|
||||||
|
}
|
||||||
|
{% endfor %}
|
||||||
|
},
|
||||||
|
"PasswordManagerEnabled": {{ applications[application_id].password_manager_enabled }}
|
||||||
}
|
}
|
3
roles/client-browser-firefox/vars/configuration.yml
Normal file
3
roles/client-browser-firefox/vars/configuration.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
plugins: # Plugins to be installed in Firefox
|
||||||
|
- "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi" # U-Block Origine Plugin
|
||||||
|
- "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi" # KeepassXC Plugin
|
4
roles/client-gnome/vars/configuration.yml
Normal file
4
roles/client-gnome/vars/configuration.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
plugins:
|
||||||
|
- [enable,nasa_apod@elinvention.ovh,https://github.com/Elinvention/gnome-shell-extension-nasa-apod.git]
|
||||||
|
- [disable,dash-to-dock@micxgx.gmail.com,'']
|
||||||
|
- [enable, dash-to-panel@jderose9.github.com,'']
|
1
roles/client-gnome/vars/main.yml
Normal file
1
roles/client-gnome/vars/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
application_id: gnome
|
1
roles/client-libreoffice/vars/configuration.yml
Normal file
1
roles/client-libreoffice/vars/configuration.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
flavor: "fresh" # Libre Office flavor, fresh for new, still for stable
|
1
roles/client-libreoffice/vars/main.yml
Normal file
1
roles/client-libreoffice/vars/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
application_id: "libreoffice"
|
9
roles/docker-akaunting/meta/schema.yml
Normal file
9
roles/docker-akaunting/meta/schema.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Database password for MariaDB"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
||||||
|
setup_admin_password:
|
||||||
|
description: "Initial admin user password for Akaunting"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
@ -14,9 +14,9 @@ DB_PASSWORD={{database_password}}
|
|||||||
DB_PREFIX=asd_
|
DB_PREFIX=asd_
|
||||||
|
|
||||||
# These define the first company to exist on this instance. They are only used during setup.
|
# These define the first company to exist on this instance. They are only used during setup.
|
||||||
COMPANY_NAME={{applications.akaunting.company_name}}
|
COMPANY_NAME={{applications[application_id].company_name}}
|
||||||
COMPANY_EMAIL={{applications.akaunting.company_email}}
|
COMPANY_EMAIL={{applications[application_id].company_email}}
|
||||||
|
|
||||||
# This will be the first administrative user created on setup.
|
# This will be the first administrative user created on setup.
|
||||||
ADMIN_EMAIL={{applications.akaunting.setup_admin_email}}
|
ADMIN_EMAIL={{applications.akaunting.setup_admin_email}}
|
||||||
ADMIN_PASSWORD={{akaunting_setup_admin_password}}
|
ADMIN_PASSWORD={{applications[application_id].credentials.setup_admin_password}}
|
||||||
|
12
roles/docker-akaunting/vars/configuration.yml
Normal file
12
roles/docker-akaunting/vars/configuration.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
version: "latest"
|
||||||
|
company_name: "{{primary_domain}}"
|
||||||
|
company_email: "{{users.administrator.email}}"
|
||||||
|
setup_admin_email: "{{users.administrator.email}}"
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: false
|
||||||
|
central_database: true
|
||||||
|
credentials:
|
||||||
|
# database_password: Needs to be defined in inventory file
|
||||||
|
# setup_admin_password: Needs to be defined in inventory file
|
@ -1,4 +1,4 @@
|
|||||||
application_id: "akaunting"
|
application_id: "akaunting"
|
||||||
database_type: "mariadb"
|
database_type: "mariadb"
|
||||||
database_password: "{{akaunting_database_password}}"
|
database_password: "{{ applications[application_id]].credentials.database_password }}"
|
||||||
docker_repository_address: "https://github.com/akaunting/docker.git"
|
docker_repository_address: "https://github.com/akaunting/docker.git"
|
||||||
|
5
roles/docker-attendize/meta/schema.yml
Normal file
5
roles/docker-attendize/meta/schema.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Database password for MariaDB used by Attendize"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
9
roles/docker-attendize/vars/configuration.yml
Normal file
9
roles/docker-attendize/vars/configuration.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
version: "latest"
|
||||||
|
credentials:
|
||||||
|
# database_password: Password for the database
|
||||||
|
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: false
|
||||||
|
central_database: true
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
application_id: "attendize"
|
application_id: "attendize"
|
||||||
database_type: "mariadb"
|
database_type: "mariadb"
|
||||||
database_password: "{{attendize_database_password}}"
|
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||||
docker_repository_address: "https://github.com/Attendize/Attendize.git"
|
docker_repository_address: "https://github.com/Attendize/Attendize.git"
|
5
roles/docker-baserow/meta/schema.yml
Normal file
5
roles/docker-baserow/meta/schema.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Password for the PostgreSQL database used by Baserow"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
6
roles/docker-baserow/vars/configuration.yml
Normal file
6
roles/docker-baserow/vars/configuration.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
version: "latest"
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: true
|
||||||
|
central_database: true
|
@ -1,5 +1,5 @@
|
|||||||
application_id: "baserow"
|
application_id: "baserow"
|
||||||
database_password: "{{ baserow_database_password }}"
|
database_password: "{{ baserow_database_password }}"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
||||||
domain: "{{ domains[application_id] }}"
|
domain: "{{ domains[application_id] }}"
|
||||||
http_port: "{{ ports.localhost.http[application_id] }}"
|
http_port: "{{ ports.localhost.http[application_id] }}"
|
2
roles/docker-bigbluebutton/TODO.md
Normal file
2
roles/docker-bigbluebutton/TODO.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Todo
|
||||||
|
- Propper implement and test the LDAP integration, the configuration values just had been set during refactoring
|
25
roles/docker-bigbluebutton/meta/schema.yml
Normal file
25
roles/docker-bigbluebutton/meta/schema.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
credentials:
|
||||||
|
shared_secret:
|
||||||
|
description: "Shared secret for BigBlueButton API authentication"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
||||||
|
etherpad_api_key:
|
||||||
|
description: "API key for Etherpad integration"
|
||||||
|
algorithm: "plain"
|
||||||
|
validation: "^[a-zA-Z0-9]{32}$"
|
||||||
|
rails_secret:
|
||||||
|
description: "Secret key for Rails backend"
|
||||||
|
algorithm: "random_hex"
|
||||||
|
validation: "^[a-f0-9]{128}$"
|
||||||
|
postgresql_secret:
|
||||||
|
description: "Password for PostgreSQL user"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
||||||
|
fsesl_password:
|
||||||
|
description: "Password for FreeSWITCH ESL connection"
|
||||||
|
algorithm: "plain"
|
||||||
|
validation: "^.{8,}$"
|
||||||
|
turn_secret:
|
||||||
|
description: "TURN server shared secret"
|
||||||
|
algorithm: "sha1"
|
||||||
|
validation: "^[a-f0-9]{40}$"
|
21
roles/docker-bigbluebutton/vars/configuration.yml
Normal file
21
roles/docker-bigbluebutton/vars/configuration.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
enable_greenlight: "true"
|
||||||
|
setup: false # Set to true in inventory file for initial setup
|
||||||
|
credentials:
|
||||||
|
# shared_secret: # Needs to be defined in inventory file
|
||||||
|
# etherpad_api_key: # Needs to be defined in inventory file
|
||||||
|
# rails_secret: # Needs to be defined in inventory file
|
||||||
|
# postgresql_secret: # Needs to be defined in inventory file
|
||||||
|
# fsesl_password: # Needs to be defined in inventory file
|
||||||
|
# turn_secret: # Needs to be defined in inventory file
|
||||||
|
database:
|
||||||
|
name: "multiple_databases"
|
||||||
|
username: "postgres2"
|
||||||
|
urls:
|
||||||
|
api: "{{ web_protocol }}://{{domains.bigbluebutton}}/bigbluebutton/" # API Address used by Nextcloud Integration
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: false
|
||||||
|
ldap: false
|
||||||
|
oidc: true
|
||||||
|
central_database: false
|
@ -1,13 +1,13 @@
|
|||||||
application_id: "bigbluebutton"
|
application_id: "bigbluebutton"
|
||||||
bbb_repository_directory: "{{ docker_compose.directories.services }}"
|
bbb_repository_directory: "{{ docker_compose.directories.services }}"
|
||||||
docker_compose_file_origine: "{{ docker_compose.directories.services }}docker-compose.yml"
|
docker_compose_file_origine: "{{ docker_compose.directories.services }}docker-compose.yml"
|
||||||
docker_compose_file_final: "{{ docker_compose.directories.instance }}docker-compose.yml"
|
docker_compose_file_final: "{{ docker_compose.directories.instance }}docker-compose.yml"
|
||||||
|
|
||||||
# Database configuration
|
# Database configuration
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
||||||
database_password: "{{ applications.bigbluebutton.credentials.postgresql_secret }}"
|
database_password: "{{ applications.bigbluebutton.credentials.postgresql_secret }}"
|
||||||
|
|
||||||
domain: "{{ domains[application_id] }}"
|
domain: "{{ domains[application_id] }}"
|
||||||
http_port: "{{ ports.localhost.http[application_id] }}"
|
http_port: "{{ ports.localhost.http[application_id] }}"
|
||||||
bbb_env_file_link: "{{ docker_compose.directories.instance }}.env"
|
bbb_env_file_link: "{{ docker_compose.directories.instance }}.env"
|
||||||
bbb_env_file_origine: "{{ bbb_repository_directory }}.env"
|
bbb_env_file_origine: "{{ bbb_repository_directory }}.env"
|
13
roles/docker-bluesky/meta/schema.yml
Normal file
13
roles/docker-bluesky/meta/schema.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
credentials:
|
||||||
|
jwt_secret:
|
||||||
|
description: "Secret used for JWT signing (base64, 64 bytes)"
|
||||||
|
algorithm: "plain"
|
||||||
|
validation: "^[A-Za-z0-9+/=]{86,}$" # 64 bytes base64 = ~86 characters without newline
|
||||||
|
plc_rotation_key_k256_private_key_hex:
|
||||||
|
description: "PLC rotation key in hex format (32 bytes)"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
||||||
|
admin_password:
|
||||||
|
description: "Initial admin password for Bluesky PDS"
|
||||||
|
algorithm: "plain"
|
||||||
|
validation: "^.{12,}$"
|
@ -4,9 +4,9 @@ PDS_SERVICE_DID="did:web:{{domains.bluesky_api}}"
|
|||||||
|
|
||||||
# See https://mattdyson.org/blog/2024/11/self-hosting-bluesky-pds/
|
# See https://mattdyson.org/blog/2024/11/self-hosting-bluesky-pds/
|
||||||
PDS_SERVICE_HANDLE_DOMAINS=".{{primary_domain}}"
|
PDS_SERVICE_HANDLE_DOMAINS=".{{primary_domain}}"
|
||||||
PDS_JWT_SECRET="{{applications.bluesky.pds.jwt_secret}}"
|
PDS_JWT_SECRET="{{applications.bluesky.credentials.jwt_secret}}"
|
||||||
PDS_ADMIN_PASSWORD="{{applications.bluesky.pds.admin_password}}"
|
PDS_ADMIN_PASSWORD="{{applications.bluesky.credentials.admin_password}}"
|
||||||
PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX="{{applications.bluesky.pds.plc_rotation_key_k256_private_key_hex}}"
|
PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX="{{applications.bluesky.credentials.plc_rotation_key_k256_private_key_hex}}"
|
||||||
PDS_CRAWLERS=https://bsky.network
|
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 }}
|
PDS_EMAIL_FROM_ADDRESS={{ users['no-reply'].email }}
|
||||||
|
14
roles/docker-bluesky/vars/configuration.yml
Normal file
14
roles/docker-bluesky/vars/configuration.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
users:
|
||||||
|
administrator:
|
||||||
|
email: "{{users.administrator.email}}"
|
||||||
|
pds:
|
||||||
|
version: "latest"
|
||||||
|
credentials:
|
||||||
|
#jwt_secret: # Needs to be defined in inventory file - Use: openssl rand -base64 64 | tr -d '\n'
|
||||||
|
#plc_rotation_key_k256_private_key_hex: # Needs to be defined in inventory file - Use: openssl rand -hex 32
|
||||||
|
#admin_password: # Needs to be defined in inventory file - Use: openssl rand -base64 16
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: true
|
||||||
|
central_database: true
|
@ -10,18 +10,18 @@
|
|||||||
name: docker-compose
|
name: docker-compose
|
||||||
|
|
||||||
# The following env file will just be used from the dedicated mariadb container
|
# The following env file will just be used from the dedicated mariadb container
|
||||||
# and not the central-mariadb-database
|
# and not the {{applications.mariadb.hostname }}-database
|
||||||
- name: "Create {{database_env}}"
|
- name: "Create {{database_env}}"
|
||||||
template:
|
template:
|
||||||
src: "env/{{database_type}}.env.j2"
|
src: "env/{{database_type}}.env.j2"
|
||||||
dest: "{{database_env}}"
|
dest: "{{database_env}}"
|
||||||
notify: docker compose project build and setup
|
notify: docker compose project build and setup
|
||||||
when: not applications[application_id].features.database | bool
|
when: not applications | is_feature_enabled('central_database',application_id)
|
||||||
|
|
||||||
- name: "Create central database"
|
- name: "Create central database"
|
||||||
include_role:
|
include_role:
|
||||||
name: "docker-{{database_type}}"
|
name: "docker-{{database_type}}"
|
||||||
when: applications[application_id].features.database | bool
|
when: applications | is_feature_enabled('central_database',application_id)
|
||||||
|
|
||||||
- name: "Add database to backup"
|
- name: "Add database to backup"
|
||||||
include_tasks: "{{ playbook_dir }}/roles/backup-docker-to-local/tasks/seed-database-to-backup.yml"
|
include_tasks: "{{ playbook_dir }}/roles/backup-docker-to-local/tasks/seed-database-to-backup.yml"
|
@ -0,0 +1,3 @@
|
|||||||
|
# Jinja2 configuration template
|
||||||
|
# Define your variables here
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
# This template needs to be included in docker-compose.yml, which depend on a mariadb database
|
# This template needs to be included in docker-compose.yml, which depend on a mariadb database
|
||||||
{% if not applications[application_id].features.database | bool %}
|
{% if not applications | is_feature_enabled('central_database',application_id) %}
|
||||||
database:
|
database:
|
||||||
container_name: {{application_id}}-database
|
container_name: {{application_id}}-database
|
||||||
logging:
|
logging:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# This template needs to be included in docker-compose.yml, which depend on a postgres database
|
# This template needs to be included in docker-compose.yml, which depend on a postgres database
|
||||||
{% if not applications[application_id].features.database | bool %}
|
{% if not applications | is_feature_enabled('central_database',application_id) %}
|
||||||
database:
|
database:
|
||||||
image: postgres:{{applications.postgres.version}}-alpine
|
image: postgres:{{applications.postgres.version}}-alpine
|
||||||
container_name: {{application_id}}-database
|
container_name: {{application_id}}-database
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
database_instance: "{{ 'central-' + database_type if applications[application_id].features.database | bool else application_id }}"
|
database_instance: "{{ 'central-' + database_type if applications | is_feature_enabled('central_database',application_id) else application_id }}"
|
||||||
database_host: "{{ 'central-' + database_type if applications[application_id].features.database | bool else 'database' }}"
|
database_host: "{{ 'central-' + database_type if applications | is_feature_enabled('central_database',application_id) else 'database' }}"
|
||||||
database_name: "{{ applications[application_id].credentials.database.name | default( application_id ) }}" # The overwritte configuration is needed by bigbluebutton
|
database_name: "{{ applications[application_id].credentials.database.name | default( application_id ) }}" # The overwritte configuration is needed by bigbluebutton
|
||||||
database_username: "{{ applications[application_id].credentials.database.username | default( application_id )}}" # The overwritte configuration is needed by bigbluebutton
|
database_username: "{{ applications[application_id].credentials.database.username | default( application_id )}}" # The overwritte configuration is needed by bigbluebutton
|
||||||
database_port: "{{ 3306 if database_type == 'mariadb' else 5432 }}"
|
database_port: "{{ 3306 if database_type == 'mariadb' else 5432 }}"
|
||||||
|
2
roles/docker-coturn/TODO.md
Normal file
2
roles/docker-coturn/TODO.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Todo
|
||||||
|
- Implement this role
|
4
roles/docker-coturn/vars/configuration.yml.j2
Normal file
4
roles/docker-coturn/vars/configuration.yml.j2
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
user: turnuser
|
||||||
|
credentials:
|
||||||
|
# password: # Need to be defined in invetory file
|
||||||
|
# secret: # Need to be defined in invetory file
|
@ -1,3 +1,3 @@
|
|||||||
application_id: "coturn"
|
application_id: "coturn"
|
||||||
#database_password: "{{gitea_database_password}}"
|
#database_password: "{{applications[application_id].credentials.database_password}}"
|
||||||
#database_type: "mariadb"
|
#database_type: "mariadb"
|
@ -11,7 +11,7 @@
|
|||||||
command:
|
command:
|
||||||
cmd: "docker network connect {{applications.discourse.network}} central-{{ database_type }}"
|
cmd: "docker network connect {{applications.discourse.network}} central-{{ database_type }}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: applications[application_id].features.database | bool
|
when: applications | is_feature_enabled('central_database',application_id)
|
||||||
listen: recreate discourse
|
listen: recreate discourse
|
||||||
|
|
||||||
- name: rebuild discourse
|
- name: rebuild discourse
|
||||||
|
5
roles/docker-discourse/meta/schema.yml
Normal file
5
roles/docker-discourse/meta/schema.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Password for the Discourse PostgreSQL database"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
@ -83,7 +83,7 @@
|
|||||||
cmd: "docker network connect central_postgres {{applications.discourse.container}}"
|
cmd: "docker network connect central_postgres {{applications.discourse.container}}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when:
|
when:
|
||||||
- applications[application_id].features.database | bool
|
- applications | is_feature_enabled('central_database',application_id)
|
||||||
- run_once_docker_discourse is not defined
|
- run_once_docker_discourse is not defined
|
||||||
|
|
||||||
- name: "remove central database from {{application_id}}_default"
|
- name: "remove central database from {{application_id}}_default"
|
||||||
@ -91,7 +91,7 @@
|
|||||||
cmd: "docker network disconnect {{applications.discourse.network}} central-{{ database_type }}"
|
cmd: "docker network disconnect {{applications.discourse.network}} central-{{ database_type }}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when:
|
when:
|
||||||
- applications[application_id].features.database | bool
|
- applications | is_feature_enabled('central_database',application_id)
|
||||||
- run_once_docker_discourse is not defined
|
- run_once_docker_discourse is not defined
|
||||||
|
|
||||||
- name: run the docker_discourse tasks once
|
- name: run the docker_discourse tasks once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
templates:
|
templates:
|
||||||
{% if not applications[application_id].features.database | bool %}
|
{% if not applications | is_feature_enabled('central_database',application_id) %}
|
||||||
- "templates/postgres.template.yml"
|
- "templates/postgres.template.yml"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
#- "templates/redis.template.yml"
|
#- "templates/redis.template.yml"
|
||||||
|
11
roles/docker-discourse/vars/configuration.yml
Normal file
11
roles/docker-discourse/vars/configuration.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
network: "discourse_default" # Name of the docker network
|
||||||
|
container: "discourse_application" # Name of the container application
|
||||||
|
repository: "discourse_repository" # Name of the repository folder
|
||||||
|
credentials:
|
||||||
|
# database_password: # Needs to be defined in inventory file
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: false
|
||||||
|
oidc: true
|
||||||
|
central_database: true
|
@ -1,5 +1,5 @@
|
|||||||
application_id: "discourse"
|
application_id: "discourse"
|
||||||
database_password: "{{ applications.discourse.credentials.database.password }}"
|
database_password: "{{ applications.discourse.credentials.database_password }}"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
||||||
docker_repository_directory : "{{docker_compose.directories.services}}{{applications.discourse.repository}}/"
|
docker_repository_directory : "{{docker_compose.directories.services}}{{applications.discourse.repository}}/"
|
||||||
discourse_application_yml_destination: "{{docker_repository_directory }}containers/{{applications.discourse.container}}.yml"
|
discourse_application_yml_destination: "{{docker_repository_directory }}containers/{{applications.discourse.container}}.yml"
|
@ -1 +1,2 @@
|
|||||||
|
# Todo
|
||||||
- implement
|
- implement
|
3
roles/docker-elk/templates/configuration.yml.j2
Normal file
3
roles/docker-elk/templates/configuration.yml.j2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Jinja2 configuration template
|
||||||
|
# Define your variables here
|
||||||
|
|
9
roles/docker-espocrm/meta/schema.yml
Normal file
9
roles/docker-espocrm/meta/schema.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
credentials:
|
||||||
|
administrator_password:
|
||||||
|
description: "Initial password for the EspoCRM administrator user"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
||||||
|
database_password:
|
||||||
|
description: "Password for the EspoCRM database user"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
@ -20,7 +20,7 @@ CRON_DISABLED=true
|
|||||||
# Initial admin account
|
# Initial admin account
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
ESPOCRM_ADMIN_USERNAME={{ applications[application_id].users.administrator.username }}
|
ESPOCRM_ADMIN_USERNAME={{ applications[application_id].users.administrator.username }}
|
||||||
ESPOCRM_ADMIN_PASSWORD={{ applications[application_id].credentials.administrator.password }}
|
ESPOCRM_ADMIN_PASSWORD={{ applications[application_id].credentials.administrator_password }}
|
||||||
|
|
||||||
# Public base URL of the EspoCRM instance
|
# Public base URL of the EspoCRM instance
|
||||||
ESPOCRM_SITE_URL={{ web_protocol }}://{{ domains[application_id] }}
|
ESPOCRM_SITE_URL={{ web_protocol }}://{{ domains[application_id] }}
|
||||||
|
17
roles/docker-espocrm/vars/configuration.yml
Normal file
17
roles/docker-espocrm/vars/configuration.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
version: "latest"
|
||||||
|
users:
|
||||||
|
administrator:
|
||||||
|
username: "{{ users.administrator.username }}"
|
||||||
|
email: "{{ users.administrator.email }}"
|
||||||
|
|
||||||
|
credentials:
|
||||||
|
# administrator_password: # Set in inventory file
|
||||||
|
# database_password: # Set in your inventory file
|
||||||
|
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: false
|
||||||
|
landingpage_iframe: false
|
||||||
|
ldap: false
|
||||||
|
oidc: true
|
||||||
|
central_database: true
|
@ -1,5 +1,5 @@
|
|||||||
application_id: "espocrm"
|
application_id: "espocrm"
|
||||||
# Password for the espocrm DB user (taken from inventory applications dict)
|
# Password for the espocrm DB user (taken from inventory applications dict)
|
||||||
database_password: "{{ applications[application_id].credentials.database.password }}"
|
database_password: "{{ applications[application_id].credentials.database_password }}"
|
||||||
# EspoCRM uses MySQL/MariaDB
|
# EspoCRM uses MySQL/MariaDB
|
||||||
database_type: "mariadb"
|
database_type: "mariadb"
|
@ -8,7 +8,7 @@ The following environment variables need to be defined for successful operation:
|
|||||||
|
|
||||||
To completely reset Friendica, including its database and volumes, run:
|
To completely reset Friendica, including its database and volumes, run:
|
||||||
```bash
|
```bash
|
||||||
docker exec -i central-mariadb mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
docker exec -i {{applications.mariadb.hostname }} mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
||||||
docker compose down
|
docker compose down
|
||||||
rm -rv /mnt/hdd/data/docker/volumes/friendica_data
|
rm -rv /mnt/hdd/data/docker/volumes/friendica_data
|
||||||
docker volume rm friendica_data
|
docker volume rm friendica_data
|
||||||
@ -19,7 +19,7 @@ docker volume rm friendica_data
|
|||||||
## Manual Method:
|
## Manual Method:
|
||||||
1. Connect to the MariaDB instance:
|
1. Connect to the MariaDB instance:
|
||||||
```bash
|
```bash
|
||||||
docker exec -it central-mariadb mariadb -u root -p
|
docker exec -it {{applications.mariadb.hostname }} mariadb -u root -p
|
||||||
```
|
```
|
||||||
2. Run the following commands:
|
2. Run the following commands:
|
||||||
```sql
|
```sql
|
||||||
@ -31,7 +31,7 @@ docker volume rm friendica_data
|
|||||||
## Automatic Method:
|
## Automatic Method:
|
||||||
```bash
|
```bash
|
||||||
DB_ROOT_PASSWORD="your_root_password"
|
DB_ROOT_PASSWORD="your_root_password"
|
||||||
docker exec -i central-mariadb mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
docker exec -i {{applications.mariadb.hostname }} mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Enter the Application Container 🔍
|
## Enter the Application Container 🔍
|
||||||
|
5
roles/docker-friendica/meta/schema.yml
Normal file
5
roles/docker-friendica/meta/schema.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Password for the Friendica database user"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
7
roles/docker-friendica/vars/configuration.yml
Normal file
7
roles/docker-friendica/vars/configuration.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
version: "latest"
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: true
|
||||||
|
oidc: true
|
||||||
|
central_database: true
|
@ -1,4 +1,4 @@
|
|||||||
application_id: "friendica"
|
application_id: "friendica"
|
||||||
database_password: "{{friendica_database_password}}"
|
database_password: "{{ applications[application_id].credentials.database_password }}"
|
||||||
database_type: "mariadb"
|
database_type: "mariadb"
|
||||||
no_validation: "{{applications[application_id].features.oidc}}" # Email validation is not neccessary if OIDC is active
|
no_validation: "{{ applications[application_id].features.oidc }}" # Email validation is not neccessary if OIDC is active
|
9
roles/docker-funkwhale/meta/schema.yml
Normal file
9
roles/docker-funkwhale/meta/schema.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Password for the Funkwhale PostgreSQL database"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
||||||
|
django_secret:
|
||||||
|
description: "Django SECRET_KEY used for cryptographic signing"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
@ -98,7 +98,7 @@ STATIC_ROOT={{static_root}}
|
|||||||
DJANGO_SETTINGS_MODULE=config.settings.production
|
DJANGO_SETTINGS_MODULE=config.settings.production
|
||||||
|
|
||||||
# Generate one using `openssl rand -base64 45`, for example
|
# Generate one using `openssl rand -base64 45`, for example
|
||||||
DJANGO_SECRET_KEY={{funkwhale_django_secret}}
|
DJANGO_SECRET_KEY={{applications[application_id].credentials.django_secret}}
|
||||||
|
|
||||||
{% if applications[application_id].features.ldap | bool %}
|
{% if applications[application_id].features.ldap | bool %}
|
||||||
# LDAP settings
|
# LDAP settings
|
||||||
|
10
roles/docker-funkwhale/vars/configuration.yml
Normal file
10
roles/docker-funkwhale/vars/configuration.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
version: "1.4.0"
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: true
|
||||||
|
ldap: true
|
||||||
|
central_database: true
|
||||||
|
credentials:
|
||||||
|
# database_password: # Needs to be defined in inventory file
|
||||||
|
# django_secret: # Needs to be defined in inventory file
|
@ -1,6 +1,6 @@
|
|||||||
application_id: "funkwhale"
|
application_id: "funkwhale"
|
||||||
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
|
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
|
||||||
database_password: "{{funkwhale_database_password}}"
|
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
||||||
media_root: "/srv/funkwhale/data/"
|
media_root: "/srv/funkwhale/data/"
|
||||||
static_root: "{{media_root}}static"
|
static_root: "{{media_root}}static"
|
||||||
|
5
roles/docker-gitea/meta/schema.yml
Normal file
5
roles/docker-gitea/meta/schema.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Password for the Gitea database user"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
11
roles/docker-gitea/vars/configuration.yml
Normal file
11
roles/docker-gitea/vars/configuration.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
version: "latest" # Use latest docker image
|
||||||
|
configuration:
|
||||||
|
repository:
|
||||||
|
enable_push_create_user: True # Allow users to push local repositories to Gitea and have them automatically created for a user.
|
||||||
|
default_private: last # Default private when creating a new repository: last, private, public
|
||||||
|
default_push_create_private: True # Default private when creating a new repository with push-to-create.
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: true
|
||||||
|
central_database: true
|
@ -1,3 +1,3 @@
|
|||||||
application_id: "gitea"
|
application_id: "gitea"
|
||||||
database_password: "{{gitea_database_password}}"
|
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||||
database_type: "mariadb"
|
database_type: "mariadb"
|
10
roles/docker-gitlab/meta/schema.yml
Normal file
10
roles/docker-gitlab/meta/schema.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Password for the GitLab PostgreSQL database"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
||||||
|
|
||||||
|
initial_root_password:
|
||||||
|
description: "Initial password for the GitLab root user"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
6
roles/docker-gitlab/vars/configuration.yml
Normal file
6
roles/docker-gitlab/vars/configuration.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
version: "latest"
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: true
|
||||||
|
central_database: true
|
@ -1,3 +1,3 @@
|
|||||||
application_id: "gitlab"
|
application_id: "gitlab"
|
||||||
database_password: "{{gitlab_database_password}}"
|
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
2
roles/docker-jenkins/Todo.md
Normal file
2
roles/docker-jenkins/Todo.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Todo
|
||||||
|
- Implement this role
|
3
roles/docker-jenkins/vars/configuration.yml
Normal file
3
roles/docker-jenkins/vars/configuration.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Jinja2 configuration template
|
||||||
|
# Define your variables here
|
||||||
|
|
5
roles/docker-joomla/meta/schema.yml
Normal file
5
roles/docker-joomla/meta/schema.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Password for the Joomla database user"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
5
roles/docker-joomla/vars/configuration.yml
Normal file
5
roles/docker-joomla/vars/configuration.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
version: "latest"
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: true
|
@ -1,3 +1,3 @@
|
|||||||
application_id: "joomla"
|
application_id: "joomla"
|
||||||
database_password: "{{joomla_database_password}}"
|
database_password: "{{joomla_database_password}}"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
10
roles/docker-keycloak/meta/schema.yml
Normal file
10
roles/docker-keycloak/meta/schema.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Password for the Keycloak PostgreSQL database"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
||||||
|
|
||||||
|
administrator_password:
|
||||||
|
description: "Password for the Keycloak administrator user (used in bootstrap and CLI access)"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
@ -10,13 +10,13 @@ KC_HTTP_ENABLED= true
|
|||||||
KC_HEALTH_ENABLED= true
|
KC_HEALTH_ENABLED= true
|
||||||
KC_METRICS_ENABLED= true
|
KC_METRICS_ENABLED= true
|
||||||
|
|
||||||
KEYCLOAK_ADMIN= "{{applications.keycloak.users.administrator.username}}"
|
KEYCLOAK_ADMIN= "{{applications[application_id].users.administrator.username}}"
|
||||||
KEYCLOAK_ADMIN_PASSWORD= "{{applications.keycloak.administrator_password}}"
|
KEYCLOAK_ADMIN_PASSWORD= "{{applications[application_id].credentials.administrator_password}}"
|
||||||
KC_DB= postgres
|
KC_DB= postgres
|
||||||
KC_DB_URL= {{database_url_jdbc}}
|
KC_DB_URL= {{database_url_jdbc}}
|
||||||
KC_DB_USERNAME= {{database_username}}
|
KC_DB_USERNAME= {{database_username}}
|
||||||
KC_DB_PASSWORD= {{database_password}}
|
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= {{users.administrator.username}}
|
KC_BOOTSTRAP_ADMIN_USERNAME= "{{applications[application_id].users.administrator.username}}"
|
||||||
KC_BOOTSTRAP_ADMIN_PASSWORD= {{users.administrator.password}}
|
KC_BOOTSTRAP_ADMIN_PASSWORD= "{{applications[application_id].credentials.administrator_password}}"
|
15
roles/docker-keycloak/vars/configuration.yml
Normal file
15
roles/docker-keycloak/vars/configuration.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
version: "latest"
|
||||||
|
users:
|
||||||
|
administrator:
|
||||||
|
username: "{{users.administrator.username}}" # Administrator Username for Keycloak
|
||||||
|
import_realm: True # If True realm will be imported. If false skip.
|
||||||
|
credentials:
|
||||||
|
# database_password: # Needs to be defined in inventory file
|
||||||
|
# administrator_password: # Needs to be defined in inventory file
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: true
|
||||||
|
ldap: true
|
||||||
|
central_database: true
|
||||||
|
recaptcha: true
|
@ -1,6 +1,6 @@
|
|||||||
application_id: "keycloak"
|
application_id: "keycloak"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
||||||
database_password: "{{applications.keycloak.credentials.database.password}}"
|
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||||
container_name: "{{application_id}}_application"
|
container_name: "{{application_id}}_application"
|
||||||
realm: "{{primary_domain}}" # This is the name of the default realm which is used by the applications
|
realm: "{{primary_domain}}" # This is the name of the default realm which is used by the applications
|
||||||
import_directory_host: "{{docker_compose.directories.volumes}}import/" # Directory in which keycloack import files are placed on the host
|
import_directory_host: "{{docker_compose.directories.volumes}}import/" # Directory in which keycloack import files are placed on the host
|
||||||
|
10
roles/docker-lam/meta/schema.yml
Normal file
10
roles/docker-lam/meta/schema.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
credentials:
|
||||||
|
oauth2_proxy_cookie_secret:
|
||||||
|
description: "Secret used to encrypt OAuth2 proxy cookies (hex-encoded, 16 bytes)"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{32}$"
|
||||||
|
|
||||||
|
administrator_password:
|
||||||
|
description: "Initial password for the LAM administrator"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
14
roles/docker-lam/vars/configuration.yml
Normal file
14
roles/docker-lam/vars/configuration.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
version: "latest"
|
||||||
|
oauth2_proxy:
|
||||||
|
application: application # Needs to be the same as webinterface
|
||||||
|
port: 80 # application port
|
||||||
|
credentials:
|
||||||
|
# oauth2_proxy_cookie_secret: None # Set via openssl rand -hex 16
|
||||||
|
# administrator_password: "None" # CHANGE for security reasons
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: true
|
||||||
|
ldap: true
|
||||||
|
central_database: false
|
||||||
|
oauth2: false
|
10
roles/docker-ldap/meta/schema.yml
Normal file
10
roles/docker-ldap/meta/schema.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
credentials:
|
||||||
|
administrator_password:
|
||||||
|
description: "Initial password for the LDAP administrator (e.g. cn=admin,dc=example,dc=com)"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
||||||
|
|
||||||
|
administrator_database_password:
|
||||||
|
description: "Password used internally for the database-backed directory admin"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
# GENERAL
|
# GENERAL
|
||||||
## Database
|
## Database
|
||||||
LDAP_ADMIN_USERNAME= {{applications.ldap.users.administrator.username}} # LDAP database admin user.
|
LDAP_ADMIN_USERNAME= {{applications[application_id].administrator.username}} # LDAP database admin user.
|
||||||
LDAP_ADMIN_PASSWORD= {{applications.ldap.administrator_database_password}} # LDAP database admin password.
|
LDAP_ADMIN_PASSWORD= {{applications[application_id].credentials.administrator_database_password}} # LDAP database admin password.
|
||||||
|
|
||||||
## Users
|
## Users
|
||||||
LDAP_USERS= ' ' # Comma separated list of LDAP users to create in the default LDAP tree. Default: user01,user02
|
LDAP_USERS= ' ' # Comma separated list of LDAP users to create in the default LDAP tree. Default: user01,user02
|
||||||
@ -14,8 +14,8 @@ LDAP_ROOT= {{ldap.dn.root}} # LDAP baseDN (or su
|
|||||||
## Admin
|
## Admin
|
||||||
LDAP_ADMIN_DN= {{ldap.dn.administrator}}
|
LDAP_ADMIN_DN= {{ldap.dn.administrator}}
|
||||||
LDAP_CONFIG_ADMIN_ENABLED= yes
|
LDAP_CONFIG_ADMIN_ENABLED= yes
|
||||||
LDAP_CONFIG_ADMIN_USERNAME= {{applications.ldap.users.administrator.username}}
|
LDAP_CONFIG_ADMIN_USERNAME= {{applications[application_id].administrator.username}}
|
||||||
LDAP_CONFIG_ADMIN_PASSWORD= {{applications.ldap.administrator_password}}
|
LDAP_CONFIG_ADMIN_PASSWORD= {{applications[application_id].credentials.administrator_password}}
|
||||||
|
|
||||||
# Network
|
# Network
|
||||||
LDAP_PORT_NUMBER= {{ldap_docker_port}} # Route to default port
|
LDAP_PORT_NUMBER= {{ldap_docker_port}} # Route to default port
|
||||||
|
15
roles/docker-ldap/vars/configuration.yml
Normal file
15
roles/docker-ldap/vars/configuration.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
version: "latest"
|
||||||
|
network:
|
||||||
|
local: True # Activates local network. Necessary for LDIF import routines
|
||||||
|
docker: True # Activates docker network to allow other docker containers to connect
|
||||||
|
public: False # Set to true in inventory file if you want to expose the LDAP port to the internet
|
||||||
|
hostname: "ldap" # Hostname of the LDAP Server in the central_ldap network
|
||||||
|
webinterface: "lam" # The webinterface which should be used. Possible: lam and phpldapadmin
|
||||||
|
users:
|
||||||
|
administrator:
|
||||||
|
username: "{{users.administrator.username}}" # Administrator username
|
||||||
|
credentials:
|
||||||
|
# administrator_password: # CHANGE for security reasons in inventory file
|
||||||
|
# administrator_database_password: # CHANGE for security reasons in inventory file
|
||||||
|
features:
|
||||||
|
ldap: true
|
20
roles/docker-listmonk/meta/schema.yml
Normal file
20
roles/docker-listmonk/meta/schema.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Password for the Listmonk PostgreSQL database user"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
||||||
|
|
||||||
|
administrator_password:
|
||||||
|
description: "Initial password for the Listmonk administrator account"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
||||||
|
|
||||||
|
hcaptcha_site_key:
|
||||||
|
description: "Public site key used by Listmonk to render hCaptcha"
|
||||||
|
algorithm: "plain"
|
||||||
|
validation: "^[0-9a-zA-Z_-]{32,}$"
|
||||||
|
|
||||||
|
hcaptcha_secret:
|
||||||
|
description: "Private hCaptcha secret key for server-side verification"
|
||||||
|
algorithm: "plain"
|
||||||
|
validation: "^[0-9a-zA-Z_-]{32,}$"
|
@ -3,4 +3,4 @@ TZ={{ HOST_TIMEZONE }}
|
|||||||
# Administrator setup
|
# Administrator setup
|
||||||
|
|
||||||
LISTMONK_ADMIN_USER={{ applications[application_id].users.administrator.username }}
|
LISTMONK_ADMIN_USER={{ applications[application_id].users.administrator.username }}
|
||||||
LISTMONK_ADMIN_PASSWORD={{ applications[application_id].users.administrator.password }}
|
LISTMONK_ADMIN_PASSWORD={{ applications[application_id].credentials.administrator_password }}
|
11
roles/docker-listmonk/vars/configuration.yml
Normal file
11
roles/docker-listmonk/vars/configuration.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
users:
|
||||||
|
administrator:
|
||||||
|
username: "{{users.administrator.username}}" # Listmonk administrator account username
|
||||||
|
public_api_activated: False # Security hole. Can be used for spaming
|
||||||
|
version: "latest" # Docker Image version
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: true
|
||||||
|
central_database: true
|
||||||
|
oidc: true
|
@ -1,5 +1,5 @@
|
|||||||
application_id: "listmonk"
|
application_id: "listmonk"
|
||||||
database_password: "{{applications[application_id].credentials.database.password}}"
|
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
||||||
|
|
||||||
listmonk_settings:
|
listmonk_settings:
|
||||||
@ -25,10 +25,10 @@ listmonk_settings:
|
|||||||
value: 'true'
|
value: 'true'
|
||||||
|
|
||||||
- key: "security.captcha_key"
|
- key: "security.captcha_key"
|
||||||
value: '"{{ applications[application_id].credentials.hcaptcha.site_key }}"'
|
value: '"{{ applications[application_id].credentials.hcaptcha_site_key }}"'
|
||||||
|
|
||||||
- key: "security.captcha_secret"
|
- key: "security.captcha_secret"
|
||||||
value: '"{{ applications[application_id].credentials.hcaptcha.secret }}"'
|
value: '"{{ applications[application_id].credentials.hcaptcha_secret }}"'
|
||||||
|
|
||||||
# SMTP servers
|
# SMTP servers
|
||||||
- key: "smtp"
|
- key: "smtp"
|
||||||
|
25
roles/docker-mailu/meta/schema.yml
Normal file
25
roles/docker-mailu/meta/schema.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
credentials:
|
||||||
|
secret_key:
|
||||||
|
description: "Secret key for cryptographic operations in Mailu (must be a 16-byte random string, hex-encoded)"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{32}$"
|
||||||
|
|
||||||
|
database_password:
|
||||||
|
description: "Password for the Mailu PostgreSQL or MariaDB database user"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
||||||
|
|
||||||
|
api_token:
|
||||||
|
description: "Authentication token for accessing the Mailu RESTful API (minimum 3 characters)"
|
||||||
|
algorithm: "plain"
|
||||||
|
validation: "^.{3,}$"
|
||||||
|
|
||||||
|
initial_administrator_password:
|
||||||
|
description: "Initial password for the Mailu administrator account (used during setup)"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
||||||
|
|
||||||
|
dkim_public_key:
|
||||||
|
description: "Public DKIM key for DNS configuration (TXT record)"
|
||||||
|
algorithm: "plain"
|
||||||
|
validation: "^.{64,}$"
|
20
roles/docker-mailu/vars/configuration.yml
Normal file
20
roles/docker-mailu/vars/configuration.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
version: "2024.06" # Docker Image Version
|
||||||
|
users:
|
||||||
|
administrator:
|
||||||
|
email: "{{users.administrator.email}}" # Administrator Email for DNS Records
|
||||||
|
oidc:
|
||||||
|
email_by_username: true # If true, then the mail is set by the username. If wrong then the OIDC user email is used
|
||||||
|
enable_user_creation: true # Users will be created if not existing
|
||||||
|
domain: "{{primary_domain}}" # The main domain from which mails will be send \ email suffix behind @
|
||||||
|
credentials:
|
||||||
|
# secret_key: # Set to a randomly generated 16 bytes string
|
||||||
|
# database_password: # Needs to be set in inventory file
|
||||||
|
# api_token: # Configures the authentication token. The minimum length is 3 characters. This is a mandatory setting for using the RESTful API.
|
||||||
|
# initial_administrator_password: # Initial administrator password for setup
|
||||||
|
# dkim_public_key: # Must be set in inventory file
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: false # Deactivated mailu iframe loading until keycloak supports it
|
||||||
|
oidc: true
|
||||||
|
central_database: false # Deactivate central database for mailu, I don't know why the database deactivation is necessary
|
@ -1,7 +1,7 @@
|
|||||||
application_id: "mailu"
|
application_id: "mailu"
|
||||||
|
|
||||||
# Database Configuration
|
# Database Configuration
|
||||||
database_password: "{{applications.mailu.credentials.database.password}}"
|
database_password: "{{applications.mailu.credentials.database_password}}"
|
||||||
database_type: "mariadb"
|
database_type: "mariadb"
|
||||||
|
|
||||||
cert_mount_directory: "{{docker_compose.directories.volumes}}certs/"
|
cert_mount_directory: "{{docker_compose.directories.volumes}}certs/"
|
||||||
@ -11,4 +11,4 @@ cert_mount_directory: "{{docker_compose.directories.volumes}}certs/"
|
|||||||
docker_source: "{{ 'ghcr.io/heviat' if applications[application_id].features.oidc | bool else 'ghcr.io/mailu' }}"
|
docker_source: "{{ 'ghcr.io/heviat' if applications[application_id].features.oidc | bool else 'ghcr.io/mailu' }}"
|
||||||
|
|
||||||
domain: "{{ domains[application_id] }}"
|
domain: "{{ domains[application_id] }}"
|
||||||
http_port: "{{ ports.localhost.http[application_id] }}"
|
http_port: "{{ ports.localhost.http[application_id] }}"
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
## Execute SQL commands
|
## Execute SQL commands
|
||||||
```bash
|
```bash
|
||||||
docker exec -it central-mariadb mariadb -u root -p
|
docker exec -it {{applications.mariadb.hostname }} mariadb -u root -p
|
||||||
```
|
```
|
26
roles/docker-mariadb/meta/main.yml
Normal file
26
roles/docker-mariadb/meta/main.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
galaxy_info:
|
||||||
|
author: "Kevin Veen-Birkenbach"
|
||||||
|
description: >-
|
||||||
|
The Docker MariaDB Role offers an easy and efficient way to deploy a MariaDB server inside a Docker container.
|
||||||
|
Manage your data securely and effectively, making it ideal for production or local development.
|
||||||
|
license: "CyMaIS NonCommercial License (CNCL)"
|
||||||
|
license_url: "https://s.veen.world/cncl"
|
||||||
|
company: |
|
||||||
|
Kevin Veen-Birkenbach
|
||||||
|
Consulting & Coaching Solutions
|
||||||
|
https://www.veen.world
|
||||||
|
min_ansible_version: "2.9"
|
||||||
|
platforms:
|
||||||
|
- name: Docker
|
||||||
|
versions:
|
||||||
|
- "latest"
|
||||||
|
galaxy_tags:
|
||||||
|
- mariadb
|
||||||
|
- docker
|
||||||
|
- database
|
||||||
|
- administration
|
||||||
|
- central-database
|
||||||
|
repository: "https://s.veen.world/cymais"
|
||||||
|
issue_tracker_url: "https://s.veen.world/cymaisissues"
|
||||||
|
documentation: "https://s.veen.world/cymais"
|
5
roles/docker-mariadb/meta/schema.yml
Normal file
5
roles/docker-mariadb/meta/schema.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
credentials:
|
||||||
|
root_password:
|
||||||
|
description: "Password for the MariaDB root user"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
- name: install MariaDB
|
- name: install MariaDB
|
||||||
docker_container:
|
docker_container:
|
||||||
name: central-mariadb
|
name: "{{applications.mariadb.hostname }}"
|
||||||
image: "mariadb:{{applications.mariadb.version}}" #could lead to problems with nextcloud
|
image: "mariadb:{{applications.mariadb.version}}" #could lead to problems with nextcloud
|
||||||
detach: yes
|
detach: yes
|
||||||
env:
|
env:
|
||||||
MARIADB_ROOT_PASSWORD: "{{central_mariadb_root_password}}"
|
MARIADB_ROOT_PASSWORD: "{{applications.mariadb.credentials.root_password}}"
|
||||||
MARIADB_AUTO_UPGRADE: "1"
|
MARIADB_AUTO_UPGRADE: "1"
|
||||||
networks:
|
networks:
|
||||||
- name: central_mariadb
|
- name: central_mariadb
|
||||||
@ -23,7 +23,7 @@
|
|||||||
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" #for nextcloud
|
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" #for nextcloud
|
||||||
restart_policy: "{{docker_restart_policy}}"
|
restart_policy: "{{docker_restart_policy}}"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: "/usr/bin/mariadb --user=root --password={{central_mariadb_root_password}} --execute \"SHOW DATABASES;\""
|
test: "/usr/bin/mariadb --user=root --password={{applications.mariadb.credentials.root_password}} --execute \"SHOW DATABASES;\""
|
||||||
interval: 3s
|
interval: 3s
|
||||||
timeout: 1s
|
timeout: 1s
|
||||||
retries: 5
|
retries: 5
|
||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
- name: Wait until the MariaDB container is healthy
|
- name: Wait until the MariaDB container is healthy
|
||||||
community.docker.docker_container_info:
|
community.docker.docker_container_info:
|
||||||
name: central-mariadb
|
name: "{{applications.mariadb.hostname }}"
|
||||||
register: db_info
|
register: db_info
|
||||||
until: db_info.containers[0].State.Health.Status == "healthy"
|
until: db_info.containers[0].State.Health.Status == "healthy"
|
||||||
retries: 30
|
retries: 30
|
||||||
@ -53,7 +53,7 @@
|
|||||||
name: "{{ database_name }}"
|
name: "{{ database_name }}"
|
||||||
state: present
|
state: present
|
||||||
login_user: root
|
login_user: root
|
||||||
login_password: "{{ central_mariadb_root_password }}"
|
login_password: "{{ applications.mariadb.credentials.root_password }}"
|
||||||
login_host: 127.0.0.1
|
login_host: 127.0.0.1
|
||||||
login_port: "{{database_port}}"
|
login_port: "{{database_port}}"
|
||||||
|
|
||||||
@ -65,13 +65,13 @@
|
|||||||
priv: '{{database_name}}.*:ALL'
|
priv: '{{database_name}}.*:ALL'
|
||||||
state: present
|
state: present
|
||||||
login_user: root
|
login_user: root
|
||||||
login_password: "{{central_mariadb_root_password}}"
|
login_password: "{{applications.mariadb.credentials.root_password}}"
|
||||||
login_host: 127.0.0.1
|
login_host: 127.0.0.1
|
||||||
login_port: "{{database_port}}"
|
login_port: "{{database_port}}"
|
||||||
|
|
||||||
- name: Grant database privileges
|
- name: Grant database privileges
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: "docker exec central-mariadb mariadb -u root -p{{ central_mariadb_root_password }} -e \"GRANT ALL PRIVILEGES ON {{database_name}}.* TO '{{database_username}}'@'%';\""
|
cmd: "docker exec {{applications.mariadb.hostname }} mariadb -u root -p{{ applications.mariadb.credentials.root_password }} -e \"GRANT ALL PRIVILEGES ON {{database_name}}.* TO '{{database_username}}'@'%';\""
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
|
||||||
|
3
roles/docker-mariadb/vars/main.yml
Normal file
3
roles/docker-mariadb/vars/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version: "latest"
|
||||||
|
application_id: "mariadb"
|
||||||
|
hostname: "central-{{application_id}}"
|
40
roles/docker-mastodon/meta/schema.yml
Normal file
40
roles/docker-mastodon/meta/schema.yml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Password for the Mastodon PostgreSQL database user"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
||||||
|
|
||||||
|
secret_key_base:
|
||||||
|
description: "Main secret key used to verify the integrity of signed cookies and tokens"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
||||||
|
|
||||||
|
otp_secret:
|
||||||
|
description: "OTP secret used for two-factor authentication"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
||||||
|
|
||||||
|
vapid_private_key:
|
||||||
|
description: "Private VAPID key used for web push notifications"
|
||||||
|
algorithm: "plain"
|
||||||
|
validation: "^[-_a-zA-Z0-9]{30,}$"
|
||||||
|
|
||||||
|
vapid_public_key:
|
||||||
|
description: "Public VAPID key used for web push notifications"
|
||||||
|
algorithm: "plain"
|
||||||
|
validation: "^[-_a-zA-Z0-9]{30,}$"
|
||||||
|
|
||||||
|
active_record_encryption_deterministic_key:
|
||||||
|
description: "Deterministic encryption key for Active Record encryption"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
||||||
|
|
||||||
|
active_record_encryption_key_derivation_salt:
|
||||||
|
description: "Key derivation salt for Active Record encryption"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
||||||
|
|
||||||
|
active_record_encryption_primary_key:
|
||||||
|
description: "Primary encryption key for Active Record encrypted columns"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
@ -20,8 +20,8 @@ OTP_SECRET= {{applications.mastodon.credentials.otp_secret}}
|
|||||||
# --------
|
# --------
|
||||||
# Generate with `bundle exec rails mastodon:webpush:generate_vapid_key`
|
# Generate with `bundle exec rails mastodon:webpush:generate_vapid_key`
|
||||||
# --------
|
# --------
|
||||||
VAPID_PRIVATE_KEY= {{applications.mastodon.credentials.vapid.private_key}}
|
VAPID_PRIVATE_KEY= {{applications.mastodon.credentials.vapid_private_key}}
|
||||||
VAPID_PUBLIC_KEY= {{applications.mastodon.credentials.vapid.public_key}}
|
VAPID_PUBLIC_KEY= {{applications.mastodon.credentials.vapid_public_key}}
|
||||||
|
|
||||||
# Encryption secrets
|
# Encryption secrets
|
||||||
# ------------------
|
# ------------------
|
||||||
@ -29,9 +29,9 @@ VAPID_PUBLIC_KEY= {{applications.mastodon.credentials.vapid.public_key}}
|
|||||||
# These are private/secret values, do not share outside hosting environment
|
# These are private/secret values, do not share outside hosting environment
|
||||||
# Use `bin/rails db:encryption:init` to generate fresh secrets
|
# Use `bin/rails db:encryption:init` to generate fresh secrets
|
||||||
# Do NOT change these secrets once in use, as this would cause data loss and other issues
|
# Do NOT change these secrets once in use, as this would cause data loss and other issues
|
||||||
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY= {{applications.mastodon.credentials.active_record_encryption.deterministic_key}}
|
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY= {{applications.mastodon.credentials.active_record_encryption_deterministic_key}}
|
||||||
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT= {{applications.mastodon.credentials.active_record_encryption.key_derivation_salt}}
|
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT= {{applications.mastodon.credentials.active_record_encryption_key_derivation_salt}}
|
||||||
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY= {{applications.mastodon.credentials.active_record_encryption.primary_key}}
|
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY= {{applications.mastodon.credentials.active_record_encryption_primary_key}}
|
||||||
|
|
||||||
DB_HOST={{database_host}}
|
DB_HOST={{database_host}}
|
||||||
DB_PORT={{database_port}}
|
DB_PORT={{database_port}}
|
||||||
|
19
roles/docker-mastodon/vars/configuration.yml
Normal file
19
roles/docker-mastodon/vars/configuration.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
version: "latest"
|
||||||
|
single_user_mode: false # Set true for initial setup
|
||||||
|
setup: false # Set true in inventory file to execute the setup and initializing procedures
|
||||||
|
credentials:
|
||||||
|
# Check out the README.md of the docker-mastodon role to get detailled instructions about how to setup the credentials
|
||||||
|
# database_password:
|
||||||
|
# secret_key_base:
|
||||||
|
# otp_secret:
|
||||||
|
# vapid_private_key:
|
||||||
|
# vapid_public_key:
|
||||||
|
# active_record_encryption_deterministic_key:
|
||||||
|
# active_record_encryption_key_derivation_salt:
|
||||||
|
# active_record_encryption_primary_key:
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: true
|
||||||
|
landingpage_iframe: false
|
||||||
|
oidc: true
|
||||||
|
central_database: true
|
@ -1,3 +1,3 @@
|
|||||||
application_id: "mastodon"
|
application_id: "mastodon"
|
||||||
database_password: "{{applications[application_id].credentials.database.password}}"
|
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
15
roles/docker-matomo/meta/schema.yml
Normal file
15
roles/docker-matomo/meta/schema.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
credentials:
|
||||||
|
database_password:
|
||||||
|
description: "Password for the Matomo database user"
|
||||||
|
algorithm: "bcrypt"
|
||||||
|
validation: "^\\$2[aby]\\$.{56}$"
|
||||||
|
|
||||||
|
auth_token:
|
||||||
|
description: "Authentication token for the Matomo HTTP API (used for automation and integrations)"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{64}$"
|
||||||
|
|
||||||
|
oauth2_proxy_cookie_secret:
|
||||||
|
description: "Secret used to encrypt cookies in the OAuth2 Proxy (hex-encoded, 16 bytes)"
|
||||||
|
algorithm: "sha256"
|
||||||
|
validation: "^[a-f0-9]{32}$"
|
7
roles/docker-matomo/vars/configuration.yml
Normal file
7
roles/docker-matomo/vars/configuration.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
version: "latest"
|
||||||
|
features:
|
||||||
|
matomo: true
|
||||||
|
css: false
|
||||||
|
landingpage_iframe: false
|
||||||
|
central_database: true
|
||||||
|
oauth2: false
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
application_id: "matomo"
|
application_id: "matomo"
|
||||||
database_type: "mariadb"
|
database_type: "mariadb"
|
||||||
database_password: "{{applications.matomo.credentials.database.password}}"
|
database_password: "{{ applications[application_id].credentials.database_password }}"
|
||||||
|
|
||||||
# I don't know if this is still necessary
|
# I don't know if this is still necessary
|
||||||
domain: "{{domains.matomo}}"
|
domain: "{{ domains[application_id] }}"
|
@ -1,4 +1,4 @@
|
|||||||
# Matrix (Ansible)
|
# Matrix (Ansible - Deprecated)
|
||||||
|
|
||||||
## Warning
|
## Warning
|
||||||
This role is experimental and may not be actively maintained. Use it with caution in production environments. For a more stable deployment, please consider using the Matrix Compose role or another alternative solution.
|
This role is experimental and may not be actively maintained. Use it with caution in production environments. For a more stable deployment, please consider using the Matrix Compose role or another alternative solution.
|
||||||
|
@ -18,7 +18,7 @@ matrix_homeserver_implementation: synapse
|
|||||||
|
|
||||||
# A secret used as a base, for generating various other secrets.
|
# A secret used as a base, for generating various other secrets.
|
||||||
# You can put any string here, but generating a strong one is preferred (e.g. `pwgen -s 64 1`).
|
# You can put any string here, but generating a strong one is preferred (e.g. `pwgen -s 64 1`).
|
||||||
matrix_homeserver_generic_secret_key: "{{matrix_generic_secret_key}}"
|
matrix_homeserver_generic_secret_key: "{{applications[application_id].credentials.generic_secret_key}}"
|
||||||
|
|
||||||
# By default, the playbook manages its own Traefik (https://doc.traefik.io/traefik/) reverse-proxy server.
|
# By default, the playbook manages its own Traefik (https://doc.traefik.io/traefik/) reverse-proxy server.
|
||||||
# It will retrieve SSL certificates for you on-demand and forward requests to all other components.
|
# It will retrieve SSL certificates for you on-demand and forward requests to all other components.
|
||||||
@ -52,7 +52,7 @@ devture_traefik_config_certificatesResolvers_acme_email: "{{users.administrator.
|
|||||||
#
|
#
|
||||||
# The playbook creates additional Postgres users and databases (one for each enabled service)
|
# The playbook creates additional Postgres users and databases (one for each enabled service)
|
||||||
# using this superuser account.
|
# using this superuser account.
|
||||||
devture_postgres_connection_password: "{{matrix_database_password}}"
|
devture_postgres_connection_password: "{{applications[application_id].credentials.database_password}}"
|
||||||
|
|
||||||
# By default, we configure Coturn's external IP address using the value specified for `ansible_host` in your `inventory/hosts` file.
|
# By default, we configure Coturn's external IP address using the value specified for `ansible_host` in your `inventory/hosts` file.
|
||||||
# If this value is an external IP address, you can skip this section.
|
# If this value is an external IP address, you can skip this section.
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user