Make variable names consistent

This commit is contained in:
Wojciech Kozlowski 2023-07-08 15:34:11 +02:00
parent fa6f615a13
commit dbb294679c
12 changed files with 114 additions and 100 deletions

View File

@ -48,36 +48,43 @@ services_resolv_host: "valkyrie"
services: services:
rproxy: {} rproxy: {}
www: www:
repo_user: "{{ vault_services.www.repo_user }}" repo:
repo_token: "{{ vault_services.www.repo_token }}" user: "{{ vault_services.www.repo.user }}"
token: "{{ vault_services.www.repo.token }}"
lrproxy: {} lrproxy: {}
database: database:
password: "{{ vault_services.database.password }}" password: "{{ vault_services.database.password }}"
cloud: cloud:
domain: "{{ vault_services.cloud.domain }}" domain: "{{ vault_services.cloud.domain }}"
database_name: "{{ vault_services.cloud.database_name }}" database:
database_user: "{{ vault_services.cloud.database_user }}" name: "{{ vault_services.cloud.database.name }}"
database_password: "{{ vault_services.cloud.database_password }}" user: "{{ vault_services.cloud.database.user }}"
smtp_host: "{{ vault_services.cloud.smtp_host }}" password: "{{ vault_services.cloud.database.password }}"
smtp_name: "{{ vault_services.cloud.smtp_name }}" smtp:
smtp_password: "{{ vault_services.cloud.smtp_password }}" host: "{{ vault_services.cloud.smtp.host }}"
user: "{{ vault_services.cloud.smtp.user }}"
password: "{{ vault_services.cloud.smtp.password }}"
git: git:
domain: "{{ vault_services.git.domain }}" domain: "{{ vault_services.git.domain }}"
database_name: "{{ vault_services.git.database_name }}" database:
database_user: "{{ vault_services.git.database_user }}" name: "{{ vault_services.git.database.name }}"
database_passwd: "{{ vault_services.git.database_passwd }}" user: "{{ vault_services.git.database.user }}"
smtp_host: "{{ vault_services.git.smtp_host }}" password: "{{ vault_services.git.database.password }}"
smtp_user: "{{ vault_services.git.smtp_user }}" smtp:
smtp_passwd: "{{ vault_services.git.smtp_passwd }}" host: "{{ vault_services.git.smtp.host }}"
user: "{{ vault_services.git.smtp.user }}"
password: "{{ vault_services.git.smtp.password }}"
ssh_port: 2770 ssh_port: 2770
notes: notes:
domain: "{{ vault_services.notes.domain }}" domain: "{{ vault_services.notes.domain }}"
database_name: "{{ vault_services.notes.database_name }}" database:
database_user: "{{ vault_services.notes.database_user }}" name: "{{ vault_services.notes.database.name }}"
database_password: "{{ vault_services.notes.database_password }}" user: "{{ vault_services.notes.database.user }}"
smtp_host: "{{ vault_services.notes.smtp_host }}" password: "{{ vault_services.notes.database.password }}"
smtp_name: "{{ vault_services.notes.smtp_name }}" smtp:
smtp_password: "{{ vault_services.notes.smtp_password }}" host: "{{ vault_services.notes.smtp.host }}"
user: "{{ vault_services.notes.smtp.user }}"
password: "{{ vault_services.notes.smtp.password }}"
music: music:
domain: "{{ vault_services.music.domain }}" domain: "{{ vault_services.music.domain }}"
password_encryption_key: "{{ vault_services.music.password_encryption_key }}" password_encryption_key: "{{ vault_services.music.password_encryption_key }}"

View File

@ -30,21 +30,23 @@ argument_specs:
domain: domain:
type: "str" type: "str"
required: true required: true
database_name: database:
name:
type: "str" type: "str"
required: true required: true
database_user: user:
type: "str" type: "str"
required: true required: true
database_password: password:
type: "str" type: "str"
required: true required: true
smtp_host: smtp:
host:
type: "str" type: "str"
required: true required: true
smtp_name: user:
type: "str" type: "str"
required: true required: true
smtp_password: password:
type: "str" type: "str"
required: true required: true

View File

@ -1 +1 @@
{{ services[services_service_name].database_name }} {{ services[services_service_name].database.name }}

View File

@ -1 +1 @@
{{ services[services_service_name].database_password }} {{ services[services_service_name].database.password }}

View File

@ -1 +1 @@
{{ services[services_service_name].database_user }} {{ services[services_service_name].database.user }}

View File

@ -35,12 +35,12 @@ ExecStart=/usr/bin/podman run \
-e POSTGRES_PASSWORD_FILE=/run/secrets/database.password \ -e POSTGRES_PASSWORD_FILE=/run/secrets/database.password \
-e NEXTCLOUD_TRUSTED_DOMAINS="{{ services[services_service_name].domain }}" \ -e NEXTCLOUD_TRUSTED_DOMAINS="{{ services[services_service_name].domain }}" \
-e OVERWRITEPROTOCOL="https" \ -e OVERWRITEPROTOCOL="https" \
-e SMTP_HOST="{{ services[services_service_name].smtp_host }}" \ -e SMTP_HOST="{{ services[services_service_name].smtp.host }}" \
-e SMTP_SECURE="ssl" \ -e SMTP_SECURE="ssl" \
-e SMTP_PORT=465 \ -e SMTP_PORT=465 \
-e SMTP_AUTHTYPE="PLAIN" \ -e SMTP_AUTHTYPE="PLAIN" \
-e SMTP_NAME="{{ services[services_service_name].smtp_name }}" \ -e SMTP_NAME="{{ services[services_service_name].smtp.user }}" \
-e SMTP_PASSWORD="{{ services[services_service_name].smtp_password }}" \ -e SMTP_PASSWORD="{{ services[services_service_name].smtp.password }}" \
-e MAIL_FROM_ADDRESS="cloud" \ -e MAIL_FROM_ADDRESS="cloud" \
-e MAIL_DOMAIN="{{ services[services_service_name].domain }}" \ -e MAIL_DOMAIN="{{ services[services_service_name].domain }}" \
--name=pod-cloud-nextcloud \ --name=pod-cloud-nextcloud \

View File

@ -30,22 +30,24 @@ argument_specs:
domain: domain:
type: "str" type: "str"
required: true required: true
database_name: database:
name:
type: "str" type: "str"
required: true required: true
database_user: user:
type: "str" type: "str"
required: true required: true
database_passwd: password:
type: "str" type: "str"
required: true required: true
smtp_host: smtp:
host:
type: "str" type: "str"
required: true required: true
smtp_name: user:
type: "str" type: "str"
required: true required: true
smtp_passwd: password:
type: "str" type: "str"
required: true required: true
ssh_port: ssh_port:

View File

@ -29,9 +29,9 @@ ExecStart=/usr/bin/podman run \
-e USER_GID="1000" \ -e USER_GID="1000" \
-e GITEA__database__DB_TYPE="postgres" \ -e GITEA__database__DB_TYPE="postgres" \
-e GITEA__database__HOST="pod-database:5432" \ -e GITEA__database__HOST="pod-database:5432" \
-e GITEA__database__NAME="{{ services[services_service_name].database_name }}" \ -e GITEA__database__NAME="{{ services[services_service_name].database.name }}" \
-e GITEA__database__USER="{{ services[services_service_name].database_user }}" \ -e GITEA__database__USER="{{ services[services_service_name].database.user }}" \
-e GITEA__database__PASSWD="{{ services[services_service_name].database_passwd }}" \ -e GITEA__database__PASSWD="{{ services[services_service_name].database.password }}" \
-e GITEA__server__DOMAIN="{{ services[services_service_name].domain }}" \ -e GITEA__server__DOMAIN="{{ services[services_service_name].domain }}" \
-e GITEA__server__ROOT_URL="https://%(DOMAIN)s/" \ -e GITEA__server__ROOT_URL="https://%(DOMAIN)s/" \
-e GITEA__server__START_SSH_SERVER="true" \ -e GITEA__server__START_SSH_SERVER="true" \
@ -40,9 +40,9 @@ ExecStart=/usr/bin/podman run \
-e GITEA__mailer__ENABLED="true" \ -e GITEA__mailer__ENABLED="true" \
-e GITEA__mailer__FROM="Gitea <git@{{ services[services_service_name].domain }}>" \ -e GITEA__mailer__FROM="Gitea <git@{{ services[services_service_name].domain }}>" \
-e GITEA__mailer__MAILER_TYPE="smtp" \ -e GITEA__mailer__MAILER_TYPE="smtp" \
-e GITEA__mailer__HOST="{{ services[services_service_name].smtp_host }}" \ -e GITEA__mailer__HOST="{{ services[services_service_name].smtp.host }}" \
-e GITEA__mailer__USER="{{ services[services_service_name].smtp_user }}" \ -e GITEA__mailer__USER="{{ services[services_service_name].smtp.user }}" \
-e GITEA__mailer__PASSWD="{{ services[services_service_name].smtp_passwd }}" \ -e GITEA__mailer__PASSWD="{{ services[services_service_name].smtp.password }}" \
-e GITEA__service__DISABLE_REGISTRATION="true" \ -e GITEA__service__DISABLE_REGISTRATION="true" \
-e GITEA__service__ENABLE_NOTIFY_MAIL="true" \ -e GITEA__service__ENABLE_NOTIFY_MAIL="true" \
--name=pod-git-gitea \ --name=pod-git-gitea \

View File

@ -30,21 +30,23 @@ argument_specs:
domain: domain:
type: "str" type: "str"
required: true required: true
database_name: database:
name:
type: "str" type: "str"
required: true required: true
database_user: user:
type: "str" type: "str"
required: true required: true
database_password: password:
type: "str" type: "str"
required: true required: true
smtp_host: smtp:
host:
type: "str" type: "str"
required: true required: true
smtp_name: user:
type: "str" type: "str"
required: true required: true
smtp_password: password:
type: "str" type: "str"
required: true required: true

View File

@ -27,17 +27,17 @@ ExecStart=/usr/bin/podman run \
-e APP_BASE_URL="https://{{ services[services_service_name].domain }}" \ -e APP_BASE_URL="https://{{ services[services_service_name].domain }}" \
-e APP_PORT="22300" \ -e APP_PORT="22300" \
-e DB_CLIENT="pg" \ -e DB_CLIENT="pg" \
-e POSTGRES_PASSWORD="{{ services[services_service_name].database_password }}" \ -e POSTGRES_PASSWORD="{{ services[services_service_name].database.password }}" \
-e POSTGRES_DATABASE="{{ services[services_service_name].database_name }}" \ -e POSTGRES_DATABASE="{{ services[services_service_name].database.name }}" \
-e POSTGRES_USER="{{ services[services_service_name].database_user }}" \ -e POSTGRES_USER="{{ services[services_service_name].database.user }}" \
-e POSTGRES_PORT="5432" \ -e POSTGRES_PORT="5432" \
-e POSTGRES_HOST="pod-database" \ -e POSTGRES_HOST="pod-database" \
-e MAILER_ENABLED="true" \ -e MAILER_ENABLED="true" \
-e MAILER_HOST="{{ services[services_service_name].smtp_host }}" \ -e MAILER_HOST="{{ services[services_service_name].smtp.host }}" \
-e MAILER_PORT=465 \ -e MAILER_PORT=465 \
-e MAILER_SECURITY="tls" \ -e MAILER_SECURITY="tls" \
-e MAILER_AUTH_USER="{{ services[services_service_name].smtp_name }}" \ -e MAILER_AUTH_USER="{{ services[services_service_name].smtp.user }}" \
-e MAILER_AUTH_PASSWORD="{{ services[services_service_name].smtp_password }}" \ -e MAILER_AUTH_PASSWORD="{{ services[services_service_name].smtp.password }}" \
-e MAILER_NOREPLY_NAME="Joplin" \ -e MAILER_NOREPLY_NAME="Joplin" \
-e MAILER_NOREPLY_EMAIL="notes@{{ services[services_service_name].domain }}" \ -e MAILER_NOREPLY_EMAIL="notes@{{ services[services_service_name].domain }}" \
-e STORAGE_DRIVER="Type=Filesystem; Path=/data" \ -e STORAGE_DRIVER="Type=Filesystem; Path=/data" \

View File

@ -22,9 +22,10 @@ argument_specs:
required: true required: true
services: services:
www: www:
repo_user: repo:
user:
type: "str" type: "str"
required: true required: true
repo_token: token:
type: "str" type: "str"
required: true required: true

View File

@ -56,8 +56,8 @@
- name: "clone website repository" - name: "clone website repository"
ansible.builtin.git: ansible.builtin.git:
repo: "\ repo: "\
https://{{ services[services_service_name].repo_user }}:\ https://{{ services[services_service_name].repo.user }}:\
{{ services[services_service_name].repo_token }}@\ {{ services[services_service_name].repo.token }}@\
git.wojciechkozlowski.eu/wojtek/wojciechkozlowski.eu.git" git.wojciechkozlowski.eu/wojtek/wojciechkozlowski.eu.git"
dest: "\ dest: "\
{{ services_service_user_home }}/.config/{{ services_service_user_name }}/\ {{ services_service_user_home }}/.config/{{ services_service_user_name }}/\