Refactor the vault/secrets
This commit is contained in:
parent
11c339ce92
commit
28f2e9a33a
32 changed files with 144 additions and 83 deletions
|
|
@ -2,7 +2,7 @@ class FilterModule(object):
|
|||
def filters(self):
|
||||
return {
|
||||
'hosts_to_gatus': self.hosts_to_gatus,
|
||||
'vault_hosts_backup_to_gatus': self.vault_hosts_backup_to_gatus,
|
||||
'hosts_backup_to_gatus': self.hosts_backup_to_gatus,
|
||||
'services_to_gatus': self.services_to_gatus,
|
||||
}
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ class FilterModule(object):
|
|||
})
|
||||
return result
|
||||
|
||||
def vault_hosts_backup_to_gatus(self, hostvars):
|
||||
def hosts_backup_to_gatus(self, hostvars):
|
||||
result = []
|
||||
backup_alerts = []
|
||||
for a in self.default_alerts:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
authentik_secret_key: "{{ undef() }}"
|
||||
|
||||
authentik_svc:
|
||||
domain: "{{ all_services | service_get_domain(role_name) }}"
|
||||
port: 9000
|
||||
|
|
@ -11,7 +13,7 @@ authentik_svc:
|
|||
database: "{{ opentofu.postgresql_data.authentik.database }}"
|
||||
|
||||
authentik_env:
|
||||
AUTHENTIK_SECRET_KEY: "{{ vault_authentik.secret_key }}"
|
||||
AUTHENTIK_SECRET_KEY: "{{ authentik_secret_key | mandatory }}"
|
||||
|
||||
AUTHENTIK_EMAIL__HOST: "{{ mailer.host }}"
|
||||
AUTHENTIK_EMAIL__PORT: "{{ mailer.port }}"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
backup_list: "{{ host_services | services_get_attr('backup') | flatten }}"
|
||||
backup_list_all: "{{ all_services | services_get_attr('backup') | flatten }}"
|
||||
|
||||
backup_backends: {}
|
||||
|
||||
backup_msg_start: "Backup started"
|
||||
backup_msg_fail: "Backup failed"
|
||||
backup_msg_fail_location: "Backup failed for location: "
|
||||
|
|
@ -42,17 +44,17 @@ backup_global:
|
|||
backup_yml:
|
||||
version: 2
|
||||
|
||||
backends: "{{ vault_backup.backends }}"
|
||||
backends: "{{ backup_backends | mandatory }}"
|
||||
|
||||
locations: "{{ backup_list | map_backup_locations(vault_backup.backends, backup_default_hooks) }}"
|
||||
locations: "{{ backup_list | map_backup_locations(backup_backends | mandatory, backup_default_hooks) }}"
|
||||
|
||||
global: "{{ backup_global }}"
|
||||
|
||||
backup_yml_all:
|
||||
version: 2
|
||||
|
||||
backends: "{{ vault_backup.backends }}"
|
||||
backends: "{{ backup_backends | mandatory }}"
|
||||
|
||||
locations: "{{ backup_list_all | map_backup_locations(vault_backup.backends, backup_default_hooks) }}"
|
||||
locations: "{{ backup_list_all | map_backup_locations(backup_backends | mandatory, backup_default_hooks) }}"
|
||||
|
||||
global: "{{ backup_global }}"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
caddy_acmedns_user: "{{ vault_caddy.acmedns.user }}"
|
||||
caddy_acmedns_pass: "{{ vault_caddy.acmedns.pass }}"
|
||||
caddy_acmedns_subd: "{{ vault_caddy.acmedns.subd }}"
|
||||
caddy_acmedns_user: "{{ undef() }}"
|
||||
caddy_acmedns_pass: "{{ undef() }}"
|
||||
caddy_acmedns_subd: "{{ undef() }}"
|
||||
caddy_acmedns_url: "https://{{ acme_dns.host }}"
|
||||
|
||||
caddy_ports: "{{ host_services | services_get_attr('ports') | flatten | services_ports_to_docker('reverse_proxy') }}"
|
||||
|
|
@ -9,9 +9,9 @@ caddy_ports: "{{ host_services | services_get_attr('ports') | flatten | services
|
|||
caddy_env:
|
||||
CADDY_ADMIN: unix//run/caddy-admin.sock
|
||||
|
||||
ACMEDNS_USER: "{{ caddy_acmedns_user }}"
|
||||
ACMEDNS_PASS: "{{ caddy_acmedns_pass }}"
|
||||
ACMEDNS_SUBD: "{{ caddy_acmedns_subd }}"
|
||||
ACMEDNS_USER: "{{ caddy_acmedns_user | mandatory }}"
|
||||
ACMEDNS_PASS: "{{ caddy_acmedns_pass | mandatory }}"
|
||||
ACMEDNS_SUBD: "{{ caddy_acmedns_subd | mandatory }}"
|
||||
ACMEDNS_URL: "{{ caddy_acmedns_url }}"
|
||||
|
||||
caddy_compose:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
deploy_reitanlage_oranienburg_token: "{{ undef() }}"
|
||||
|
||||
deploy_svc:
|
||||
domain: "{{ all_services | service_get_domain(role_name) }}"
|
||||
port: 9000
|
||||
|
|
@ -16,7 +18,7 @@ deploy_yml:
|
|||
and:
|
||||
- match:
|
||||
type: value
|
||||
value: "{{ vault_deploy.reitanlage_oranienburg_token }}"
|
||||
value: "{{ deploy_reitanlage_oranienburg_token | mandatory }}"
|
||||
parameter:
|
||||
source: header
|
||||
name: X-Webhook-Token
|
||||
|
|
|
|||
|
|
@ -1,18 +1,23 @@
|
|||
---
|
||||
emgauwa_server_port: 4419
|
||||
emgauwa_server_token: "{{ vault_emgauwa.token }}"
|
||||
emgauwa_server_token: "{{ undef() }}"
|
||||
|
||||
emgauwa_acmedns_user: "{{ undef() }}"
|
||||
emgauwa_acmedns_pass: "{{ undef() }}"
|
||||
emgauwa_acmedns_subd: "{{ undef() }}"
|
||||
emgauwa_acmedns_url: "https://{{ acme_dns.host }}"
|
||||
|
||||
emgauwa_env:
|
||||
ACMEDNS_USER: "{{ vault_emgauwa.acme_dns.user }}"
|
||||
ACMEDNS_PASS: "{{ vault_emgauwa.acme_dns.pass }}"
|
||||
ACMEDNS_SUBD: "{{ vault_emgauwa.acme_dns.subd }}"
|
||||
ACMEDNS_URL: "{{ vault_emgauwa.acme_dns.url }}"
|
||||
ACMEDNS_USER: "{{ emgauwa_acmedns_user | mandatory }}"
|
||||
ACMEDNS_PASS: "{{ emgauwa_acmedns_pass | mandatory }}"
|
||||
ACMEDNS_SUBD: "{{ emgauwa_acmedns_subd | mandatory }}"
|
||||
ACMEDNS_URL: "{{ emgauwa_acmedns_url }}"
|
||||
|
||||
emgauwa_core_yml:
|
||||
server:
|
||||
host: 0.0.0.0
|
||||
port: "{{ emgauwa_server_port }}"
|
||||
token: "{{ emgauwa_server_token }}"
|
||||
token: "{{ emgauwa_server_token | mandatory }}"
|
||||
database: sqlite:///data/core.sqlite
|
||||
|
||||
emgauwa_controller_yml:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
extra_services_svc:
|
||||
extra_svcs: "{{ vault_extra_services }}"
|
||||
extra_svcs: []
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
---
|
||||
factorio_port: 34197
|
||||
factorio_username: "{{ undef() }}"
|
||||
factorio_token: "{{ undef() }}"
|
||||
factorio_game_password: "{{ undef() }}"
|
||||
|
||||
factorio_uid: 845
|
||||
factorio_gid: 845
|
||||
|
||||
factorio_env:
|
||||
PORT: "{{ factorio_port }}"
|
||||
USERNAME: "{{ vault_factorio.username }}"
|
||||
TOKEN: "{{ vault_factorio.token }}"
|
||||
USERNAME: "{{ factorio_username | mandatory }}"
|
||||
TOKEN: "{{ factorio_token | mandatory }}"
|
||||
|
||||
factorio_json:
|
||||
name: "StammtischOnAutomation"
|
||||
|
|
@ -18,11 +22,11 @@ factorio_json:
|
|||
public: true
|
||||
lan: true
|
||||
|
||||
username: "{{ vault_factorio.username }}"
|
||||
username: "{{ factorio_username | mandatory }}"
|
||||
password: ""
|
||||
token: "{{ vault_factorio.token }}"
|
||||
token: "{{ factorio_token | mandatory }}"
|
||||
|
||||
game_password: "{{ vault_factorio.game_password }}"
|
||||
game_password: "{{ factorio_game_password | mandatory }}"
|
||||
require_user_verification: true
|
||||
|
||||
max_upload_in_kilobytes_per_second: 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
---
|
||||
forgejo_server_lfs_jwt_secret: "{{ undef() }}"
|
||||
forgejo_security_internal_token: "{{ undef() }}"
|
||||
forgejo_security_secret_key: "{{ undef() }}"
|
||||
forgejo_oauth2_jwt_secret: "{{ undef() }}"
|
||||
forgejo_umami: "{{ undef() }}"
|
||||
|
||||
forgejo_svc:
|
||||
domain: "{{ all_services | service_get_domain(role_name) }}"
|
||||
port: 3000
|
||||
|
|
@ -37,13 +43,13 @@ forgejo_ini:
|
|||
SSH_PORT: "{{ svc.ssh_port }}"
|
||||
ROOT_URL: https://{{ svc.domain }}
|
||||
OFFLINE_MODE: true
|
||||
LFS_JWT_SECRET: "{{ vault_forgejo.server_lfs_jwt_secret }}"
|
||||
LFS_JWT_SECRET: "{{ forgejo_server_lfs_jwt_secret | mandatory }}"
|
||||
LFS_START_SERVER: true
|
||||
|
||||
security:
|
||||
INSTALL_LOCK: true
|
||||
INTERNAL_TOKEN: "{{ vault_forgejo.security_internal_token }}"
|
||||
SECRET_KEY: "{{ vault_forgejo.security_secret_key }}"
|
||||
INTERNAL_TOKEN: "{{ forgejo_security_internal_token | mandatory }}"
|
||||
SECRET_KEY: "{{ forgejo_security_secret_key | mandatory }}"
|
||||
|
||||
openid:
|
||||
ENABLE_OPENID_SIGNUP: true
|
||||
|
|
@ -75,14 +81,14 @@ forgejo_ini:
|
|||
MAX_FILES: 10
|
||||
|
||||
oauth2:
|
||||
JWT_SECRET: "{{ vault_forgejo.oauth2_jwt_secret }}"
|
||||
JWT_SECRET: "{{ forgejo_oauth2_jwt_secret | mandatory }}"
|
||||
|
||||
log.console:
|
||||
FLAGS: "level,medfile,shortfuncname"
|
||||
|
||||
metrics:
|
||||
ENABLED: true
|
||||
TOKEN: "{{ vault_metrics_token }}"
|
||||
TOKEN: "{{ metrics_token | mandatory }}"
|
||||
|
||||
actions:
|
||||
ENABLED: true
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<script async src="/_a/script.js" data-website-id="{{ vault_forgejo.umami }}"></script>
|
||||
<script async src="/_a/script.js" data-website-id="{{ forgejo_umami | mandatory }}"></script>
|
||||
<script async src="/_a/track-external.js"></script>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
---
|
||||
gatus_svc:
|
||||
domain: "{{ all_services | service_get_domain(role_name) }}"
|
||||
port: 8080
|
||||
|
||||
gatus_external_endpoints_backups: "{{ hostvars | vault_hosts_backup_to_gatus() }}"
|
||||
gatus_external_endpoints_backups: "{{ hostvars | hosts_backup_to_gatus() }}"
|
||||
|
||||
gatus_endpoints_hosts: "{{ opentofu.hosts | hosts_to_gatus() }}"
|
||||
gatus_endpoints_services: "{{ all_services | services_to_gatus() }}"
|
||||
|
|
@ -34,6 +30,12 @@ gatus_endpoints_other:
|
|||
ui:
|
||||
hide-url: true
|
||||
|
||||
gatus_alerting: "{{ undef() }}"
|
||||
|
||||
gatus_svc:
|
||||
domain: "{{ all_services | service_get_domain(role_name) }}"
|
||||
port: 8080
|
||||
|
||||
gatus_yml:
|
||||
storage:
|
||||
type: sqlite
|
||||
|
|
@ -49,9 +51,7 @@ gatus_yml:
|
|||
- name: Matrix Federation Tester
|
||||
link: "{{ gatus_federation_tester }}"
|
||||
|
||||
alerting:
|
||||
email: "{{ vault_gatus.alerting.email }}"
|
||||
ntfy: "{{ vault_gatus.alerting.ntfy }}"
|
||||
alerting: "{{ gatus_alerting | mandatory }}"
|
||||
|
||||
metrics: true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
---
|
||||
healthcheck_matrix_token: "{{ undef() }}"
|
||||
healthcheck_matrix_room: "{{ undef() }}"
|
||||
healthcheck_mailer_user: "{{ undef() }}"
|
||||
healthcheck_mailer_pass: "{{ undef() }}"
|
||||
|
||||
healthcheck_svc:
|
||||
checks:
|
||||
- mail
|
||||
|
|
@ -10,11 +15,11 @@ healthcheck_env:
|
|||
MATRIX_SERVER: https://matrix.serguzim.me
|
||||
MATRIX_SERVER_FEDTESTER: msrg.cc
|
||||
MATRIX_HC_URL: "{{ opentofu.healthchecksio.healthcheck.matrix.ping_url }}"
|
||||
MATRIX_TOKEN: "{{ vault_healthcheck.matrix.token }}"
|
||||
MATRIX_ROOM: "{{ vault_healthcheck.matrix.room }}"
|
||||
MATRIX_TOKEN: "{{ healthcheck_matrix_token | mandatory }}"
|
||||
MATRIX_ROOM: "{{ healthcheck_matrix_room | mandatory }}"
|
||||
|
||||
MAIL_HC_UID: "{{ opentofu.healthchecksio.healthcheck.mail.id }}"
|
||||
MAIL_HOST: "{{ mailer.host }}"
|
||||
MAIL_PORT: "{{ mailer.port }}"
|
||||
MAIL_USER: "{{ vault_healthcheck.mailer.user }}"
|
||||
MAIL_PASS: "{{ vault_healthcheck.mailer.pass }}"
|
||||
MAIL_USER: "{{ healthcheck_mailer_user | mandatory }}"
|
||||
MAIL_PASS: "{{ healthcheck_mailer_pass | mandatory }}"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
immich_db_host: database
|
||||
immich_db_db: immich
|
||||
immich_db_user: "{{ vault_immich.db.user }}"
|
||||
immich_db_pass: "{{ vault_immich.db.pass }}"
|
||||
immich_db_user: "{{ undef() }}"
|
||||
immich_db_pass: "{{ undef() }}"
|
||||
|
||||
immich_docker_tag: v2.3.1
|
||||
|
||||
|
|
@ -15,12 +15,12 @@ immich_env:
|
|||
|
||||
DB_HOSTNAME: "{{ immich_db_host }}"
|
||||
DB_DATABASE_NAME: "{{ immich_db_db }}"
|
||||
DB_USERNAME: "{{ immich_db_user }}"
|
||||
DB_PASSWORD: "{{ immich_db_pass }}"
|
||||
DB_USERNAME: "{{ immich_db_user | mandatory }}"
|
||||
DB_PASSWORD: "{{ immich_db_pass | mandatory }}"
|
||||
|
||||
POSTGRES_DB: "{{ immich_db_db }}"
|
||||
POSTGRES_USER: "{{ immich_db_user }}"
|
||||
POSTGRES_PASSWORD: "{{ immich_db_pass }}"
|
||||
POSTGRES_USER: "{{ immich_db_user | mandatory }}"
|
||||
POSTGRES_PASSWORD: "{{ immich_db_pass | mandatory }}"
|
||||
|
||||
REDIS_HOSTNAME: redis
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
immich_worker_db_host: "{{ }}"
|
||||
immich_worker_db_db: immich
|
||||
immich_worker_db_user: "{{ vault_immich.db.user }}"
|
||||
immich_worker_db_pass: "{{ vault_immich.db.pass }}"
|
||||
immich_worker_db_user: "{{ immich_db_user | mandatory }}"
|
||||
immich_worker_db_pass: "{{ immich_db_pass | mandatory }}"
|
||||
|
||||
immich_worker_docker_tag: v2.3.1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
jitsi_image_version: stable-10314
|
||||
jitsi_jicofo_auth_password: "{{ undef() }}"
|
||||
jitsi_jvb_auth_password: "{{ undef() }}"
|
||||
|
||||
jitsi_svc:
|
||||
domain: "{{ all_services | service_get_domain(role_name) }}"
|
||||
|
|
@ -17,8 +19,8 @@ jitsi_env:
|
|||
ENABLE_AUTH: 0
|
||||
ENABLE_GUESTS: 1
|
||||
|
||||
JICOFO_AUTH_PASSWORD: "{{ vault_jitsi.jicofo_auth_password }}"
|
||||
JVB_AUTH_PASSWORD: "{{ vault_jitsi.jvb_auth_password }}"
|
||||
JICOFO_AUTH_PASSWORD: "{{ jitsi_jicofo_auth_password | mandatory }}"
|
||||
JVB_AUTH_PASSWORD: "{{ jitsi_jvb_auth_password | mandatory }}"
|
||||
|
||||
|
||||
jitsi_compose:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
lego_host_certificates: "{{ host_services | services_get_attr('certificates') | flatten }}"
|
||||
lego_acmedns_registered: "{{ undef() }}"
|
||||
|
||||
lego_env:
|
||||
ACME_DNS_API_BASE: https://{{ acme_dns.host }}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
- name: Create the acme-dns-accounts
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ (lego_config_path, 'acme-dns-accounts.json') | path_join }}"
|
||||
content: '{{ vault_acmedns_registered | acmedns_to_lego | to_json }}'
|
||||
content: '{{ lego_acmedns_registered | acmedns_to_lego | to_json }}'
|
||||
mode: "0644"
|
||||
- name: Copy the hook script
|
||||
ansible.builtin.copy:
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ lgtm_stack_loki_domain: "{{ all_services | service_get_domain('loki') }}"
|
|||
|
||||
lgtm_stack_alloy_jobs: "{{ all_services | services_to_alloy() }}"
|
||||
|
||||
lgtm_stack_grafana_secret_key: "{{ undef() }}"
|
||||
|
||||
|
||||
lgtm_stack_svc:
|
||||
domain: "{{ lgtm_stack_domain }}"
|
||||
|
|
@ -35,7 +37,7 @@ lgtm_stack_env:
|
|||
|
||||
GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION: true
|
||||
GF_SECURITY_ADMIN_USER: "{{ admin_email }}"
|
||||
GF_SECURITY_SECRET_KEY: "{{ vault_lgtm_stack.grafana.secret_key }}"
|
||||
GF_SECURITY_SECRET_KEY: "{{ lgtm_stack_grafana_secret_key | mandatory }}"
|
||||
GF_SECURITY_COOKIE_SECURE: true
|
||||
GF_SECURITY_COOKIE_SAMESITE: "strict"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
mailcowdockerized_domains: "{{ undef }}"
|
||||
|
||||
mailcowdockerized_svc:
|
||||
domain: "{{ all_services | service_get_domain(role_name) }}"
|
||||
docker_host: host.docker.internal
|
||||
port: 3004
|
||||
additional_domains: "{{ ['autodiscover', 'autoconfig'] | product(vault_mailcowdockerized.domains) | map('join', '.') }}"
|
||||
additional_domains: "{{ ['autodiscover', 'autoconfig'] | product(mailcowdockerized_domains | mandatory) | map('join', '.') }}"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
---
|
||||
minecraft_2_seed: "{{ undef() }}"
|
||||
minecraft_2_ops: "{{ undef() }}"
|
||||
minecraft_2_whitelist: "{{ undef() }}"
|
||||
|
||||
minecraft_2_env:
|
||||
ALLOW_FLIGHT: true
|
||||
ALLOW_NETHER: true
|
||||
|
|
@ -40,16 +44,16 @@ minecraft_2_env:
|
|||
TYPE: PAPER
|
||||
ONLINE_MODE: true
|
||||
OP_PERMISSION_LEVEL: 4
|
||||
OPS: "{{ vault_minecraft_2.ops }}"
|
||||
OPS: "{{ minecraft_2_ops | mandatory }}"
|
||||
OVERRIDE_ICON: true
|
||||
OVERRIDE_SERVER_PROPERTIES: true
|
||||
PLAYER_IDLE_TIMEOUT: 0
|
||||
PREVENT_PROXY_CONNECTIONS: false
|
||||
SEED: "{{ vault_minecraft_2.seed }}"
|
||||
SEED: "{{ minecraft_2_seed | mandatory }}"
|
||||
USE_NATIVE_TRANSPORT: true
|
||||
VERSION: LATEST
|
||||
VIEW_DISTANCE: 10
|
||||
WHITELIST: "{{ vault_minecraft_2.whitelist }}"
|
||||
WHITELIST: "{{ minecraft_2_whitelist | mandatory }}"
|
||||
|
||||
minecraft_2_compose:
|
||||
watchtower: false
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue