Remove explicit svc.name

This commit is contained in:
Tobias Reisinger 2024-10-13 21:48:04 +02:00
parent 09e886c712
commit dbb3075c82
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
67 changed files with 36 additions and 87 deletions

View file

@ -19,7 +19,7 @@ compose_file_networks:
default:
apps:
aliases:
- "{{ svc.name }}"
- "{{ role_name }}"
networks:
default:
apps:

View file

@ -21,7 +21,7 @@
{% elif svc.redirect|default(false) %}
redir "{{ svc.redirect }}"
{% else %}
reverse_proxy {{ svc.docker_host|default(svc.name) }}:{{ svc.port }}
reverse_proxy {{ svc.docker_host|default(role_name) }}:{{ svc.port }}
{% endif %}
}
{% endif %}

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ NAME_svc }}"
env: "{{ NAME_env }}"

View file

@ -1,7 +1,6 @@
---
NAME_svc:
domain: NAME.serguzim.me
name: NAME
port: 80
NAME_env:

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ acme_dns_svc }}"
env: "{{ acme_dns_env }}"

View file

@ -1,7 +1,6 @@
---
acme_dns_svc:
domain: "{{ acme_dns.host }}"
name: acme-dns
port: 80
nsadmin: "{{ admin_email | regex_replace('@', '.') }}"
records:

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ authentik_svc }}"
env: "{{ authentik_env }}"

View file

@ -1,7 +1,6 @@
---
authentik_svc:
domain: auth.serguzim.me
name: authentik
port: 9000
image_tag: 2024.8
db:

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
yml: "{{ backup_yml }}"
block:

View file

@ -1,8 +1,4 @@
---
backup_svc:
name: backup
backup_list: "{{ all_services | my_service_attributes(inventory_hostname, 'backup') }}"
backup_list_all: "{{ all_services | my_service_attributes('', 'backup') }}"

View file

@ -2,9 +2,8 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ caddy_svc }}"
env: "{{ caddy_env }}"
compose: "{{ caddy_compose }}"
block:

View file

@ -12,9 +12,6 @@ caddy_ports_default:
caddy_ports_extra: "{{ all_services | my_service_attributes(inventory_hostname, 'ports') }}"
caddy_ports: "{{ caddy_ports_default | union(caddy_ports_extra) }}"
caddy_svc:
name: caddy
caddy_env:
CADDY_ADMIN: 0.0.0.0:2019

View file

@ -1,4 +1,3 @@
---
extra_services_svc:
name: extra_services
extra_svcs: "{{ vault_extra_services }}"

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ faas_svc }}"
block:

View file

@ -1,6 +1,5 @@
---
faas_svc:
name: faas
domain: faas.serguzim.me
docker_host: host.docker.internal
port: 8080

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ forgejo_svc }}"
env: "{{ forgejo_env }}"

View file

@ -1,7 +1,6 @@
---
forgejo_svc:
domain: git.serguzim.me
name: forgejo
port: 3000
caddy_extra: |
import analytics

View file

@ -2,9 +2,8 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ forgejo_runner_svc }}"
env: "{{ forgejo_runner_env }}"
compose: "{{ forgejo_runner_compose }}"
block:

View file

@ -1,7 +1,4 @@
---
forgejo_runner_svc:
name: forgejo-runner
forgejo_runner_env:
FORGEJO_INSTANCE_URL: https://git.serguzim.me/
FORGEJO_RUNNER_REGISTRATION_TOKEN:

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ gatus_svc }}"
yml: "{{ gatus_yml }}"

View file

@ -1,7 +1,6 @@
---
gatus_svc:
domain: status.serguzim.me
name: gatus
port: 8080
gatus_external_endpoints_backups: "{{ vault_hosts | vault_hosts_backup_to_gatus() }}"

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ healthcheck_svc }}"
env: "{{ healthcheck_env }}"

View file

@ -1,6 +1,5 @@
---
healthcheck_svc:
name: healthcheck
checks:
- mail
- matrix

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ homebox_svc }}"
env: "{{ homebox_env }}"

View file

@ -1,7 +1,6 @@
---
homebox_svc:
domain: inventory.serguzim.me
name: homebox
port: 7745
homebox_env:

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ immich_svc }}"
env: "{{ immich_env }}"

View file

@ -6,7 +6,6 @@ immich_db_pass: "{{ vault_immich.db.pass }}"
immich_svc:
domain: gallery.serguzim.me
name: immich
port: 3001
version: release
db:

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ influxdb_svc }}"
env: "{{ influxdb_env }}"

View file

@ -1,7 +1,6 @@
---
influxdb_svc:
domain: tick.serguzim.me
name: influxdb
port: 8086
data_dir: /var/lib/influxdb2

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ jellyfin_svc }}"
env: "{{ jellyfin_env }}"

View file

@ -1,7 +1,6 @@
---
jellyfin_svc:
domain: media.serguzim.me
name: jellyfin
port: 8096
db:
host: "{{ postgres.host }}"

View file

@ -2,9 +2,8 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ lego_svc }}"
env: "{{ lego_env }}"
json: "{{ vault_acmedns_registered | acmedns_to_lego }}"
compose: "{{ lego_compose }}"

View file

@ -1,9 +1,6 @@
---
lego_host_certificates: "{{ all_services | my_service_attributes(inventory_hostname, 'certificates') }}"
lego_svc:
name: lego
lego_env:
ACME_DNS_API_BASE: https://{{ acme_dns.host }}
ACME_DNS_STORAGE_PATH: /config/acme-dns-accounts.json

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ linkwarden_svc }}"
env: "{{ linkwarden_env }}"

View file

@ -11,7 +11,6 @@ linkwarden_s3_secretkey: "{{ opentofu.scaleway_data.linkwarden.secret_key }}"
linkwarden_svc:
domain: bookmarks.serguzim.me
name: linkwarden
port: 3000
linkwarden_env:

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ mailcowdockerized_svc }}"
block:

View file

@ -1,6 +1,5 @@
---
mailcowdockerized_svc:
name: mailcowdockerized
domain: mail.serguzim.me
docker_host: host.docker.internal
port: 3004

View file

@ -2,9 +2,8 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ minecraft_2_svc }}"
env: "{{ minecraft_2_env }}"
compose: "{{ minecraft_2_compose }}"
block:

View file

@ -1,7 +1,4 @@
---
minecraft_2_svc:
name: minecraft-2
minecraft_2_env:
ALLOW_FLIGHT: true
ALLOW_NETHER: true

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ minio_svc }}"
env: "{{ minio_env }}"

View file

@ -1,7 +1,6 @@
---
minio_svc:
domain: s3.serguzim.me
name: minio
port: 9000
caddy_extra: |
@nocache {

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ ntfy_svc }}"
compose: "{{ ntfy_compose }}"

View file

@ -1,6 +1,5 @@
---
ntfy_svc:
name: ntfy
domain: push.serguzim.me
port: 80

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ reitanlage_oranienburg_svc }}"
compose: "{{ reitanlage_oranienburg_compose }}"

View file

@ -1,6 +1,5 @@
---
reitanlage_oranienburg_svc:
name: reitanlage-oranienburg
domain: reitanlage-oranienburg.de
www_domain: true
port: 80

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ shlink_svc }}"
env: "{{ shlink_env }}"

View file

@ -3,7 +3,6 @@ shlink_svc:
domain: msrg.cc
additional_domains:
- "emgauwa.app"
name: shlink
port: 8080
shlink_env:

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ synapse_svc }}"
env: "{{ synapse_env }}"

View file

@ -1,6 +1,5 @@
---
synapse_svc:
name: synapse
domain: matrix.serguzim.me
docker_host: synapse-admin
port: 80

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ tandoor_svc }}"
env: "{{ tandoor_env }}"

View file

@ -1,7 +1,6 @@
---
tandoor_svc:
domain: recipes.serguzim.me
name: tandoor
port: 80
db:
host: "{{ postgres.host }}"

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ teamspeak_fallback_svc }}"
compose: "{{ teamspeak_fallback_compose }}"

View file

@ -8,7 +8,6 @@ teamspeak_fallback_user: 9987
teamspeak_fallback_group: 9987
teamspeak_fallback_svc:
name: teamspeak-fallback
domain: ts.serguzim.me
additional_domains:
- hook.serguzim.me

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ telegraf_svc }}"
env: "{{ telegraf_env }}"

View file

@ -1,6 +1,5 @@
---
telegraf_svc:
name: telegraf
influxdb:
url: https://tick.serguzim.me
token: "{{ vault_telegraf.influxdb_token }}"

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ tinytinyrss_svc }}"
env: "{{ tinytinyrss_env }}"

View file

@ -1,7 +1,6 @@
---
tinytinyrss_svc:
domain: rss.serguzim.me
name: tinytinyrss
port: 80
db:
host: "{{ postgres.host }}"

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ umami_svc }}"
env: "{{ umami_env }}"

View file

@ -10,7 +10,6 @@ umami_docker_image: docker.umami.dev/umami-software/umami:postgresql-latest
umami_svc:
domain: analytics.serguzim.me
name: umami
port: 3000
umami_env:

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ vikunja_svc }}"
yml: "{{ vikunja_yml }}"

View file

@ -1,7 +1,6 @@
---
vikunja_svc:
domain: todo.serguzim.me
name: vikunja
port: 3456
db:
host: "{{ postgres.host }}"

View file

@ -2,9 +2,8 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ watchtower_svc }}"
env: "{{ watchtower_env }}"
compose: "{{ watchtower_compose }}"
block:

View file

@ -1,7 +1,4 @@
---
watchtower_svc:
name: watchtower
watchtower_env:
WATCHTOWER_LABEL_ENABLE: true
WATCHTOWER_CLEANUP: true
@ -11,11 +8,11 @@ watchtower_env:
# WATCHTOWER_NO_PULL: true
WATCHTOWER_NOTIFICATIONS: email
WATCHTOWER_NOTIFICATION_EMAIL_FROM: "{{ svc.name }}@serguzim.me"
WATCHTOWER_NOTIFICATION_EMAIL_FROM: "watchtower@serguzim.me"
WATCHTOWER_NOTIFICATION_EMAIL_TO: "{{ admin_email }}"
WATCHTOWER_NOTIFICATION_EMAIL_SERVER: "{{ mailer.host }}"
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT: "{{ mailer.port }}"
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER: "{{ svc.name }}@serguzim.me"
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER: "watchtower@serguzim.me"
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD: "{{ vault_watchtower.mailer.pass }}"
WATCHTOWER_NOTIFICATION_EMAIL_DELAY: 5

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ wiki_js_svc }}"
env: "{{ wiki_js_env }}"

View file

@ -1,7 +1,6 @@
---
wiki_js_svc:
domain: wiki.serguzim.me
name: wiki-js
port: 3000
caddy_extra: |
import analytics

View file

@ -2,7 +2,7 @@
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
- name: Deploy {{ role_name }}
vars:
svc: "{{ woodpecker_svc }}"
env: "{{ woodpecker_env }}"

View file

@ -1,7 +1,6 @@
---
woodpecker_svc:
domain: ci.serguzim.me
name: woodpecker
port: 8000
extra_svcs:
- domain: agents.ci.serguzim.me