---

stage: "prodnso"
stage_kube: "{{ stage }}"

# TODO read configuration with hetzner rest api
shared_service_network: "10.0.0.0/16"
shared_service_pg_master_ip: "{{ stage_server_infos
  | selectattr('name', 'match', stage + '-postgres-01' )
  | map(attribute='private_ip')
  | list
  | first
  | default('-') }}"
shared_service_pg_slave_ip: "{{ stage_server_infos
  | selectattr('name', 'match', stage + '-postgres-02' )
  | map(attribute='private_ip')
  | list
  | first
  | default('-') }}"

shared_service_maria_hostname: "{{ stage }}-maria-01"
shared_service_postgres_01_hostname: "{{ stage }}-postgres-01"
shared_service_postgres_02_hostname: "{{ stage }}-postgres-02"
shared_service_elastic_stack_01_hostname: "{{ stage }}-elastic-stack-elastic-01"
shared_service_elastic_stack_02_hostname: "{{ stage }}-elastic-stack-elastic-02"
shared_service_elastic_stack_03_hostname: "{{ stage }}-elastic-stack-elastic-03"
shared_service_elastic_stack_logstash_01_hostname: "{{ stage }}-elastic-stack-logstash-01"

shared_service_iam_hostname: "{{ stage }}-iam-01.{{ domain_env }}"
shared_service_mail_hostname: "{{ stage }}-mail-01.{{ domain_env }}"
shared_service_gitea_hostname: "{{ stage }}-gitea-01.{{ domain_env }}"
shared_service_redis_hostname: "{{ stage }}-redis-01.{{ domain_env }}"
shared_service_pdns_hostname: "{{ stage }}-pdns-01.{{ domain_env }}"
shared_service_webdav_hostname: "{{ stage }}-webdav-01.{{ domain_env }}"

harbor_oidc_realm: "harbor"
harbor_oidc_client_id: "harbor"
harbor_oidc_client_secret: "{{ docker_registry_oidc_client_secret_vault }}"
harbor_oidc_admin_username: "harbor-admin"
harbor_oidc_admin_password: "{{ harbor_oidc_admin_password_vault }}"

management_oidc_realm: "management"
management_oidc_client_id: "smardigo"

connect_jwt_enabled: true
connect_jwt_secret: "908ae14462d049d3be84964ef379c7c6"
webdav_jwt_enabled: true
webdav_jwt_secret: "5646aee6dadc4c19b15f4b65f1e6549f"
iam_jwt_enabled: true
iam_jwt_secret: "456ae14462d049d3be76439ef379c7c6"

grafana_admin_username: "grafana-admin"
grafana_admin_password: "{{ grafana_admin_password_vault }}"
grafana_user_smardigo_login: "smardigo"
grafana_user_smardigo_password: "{{ grafana_user_smardigo_password_vault }}"
grafana_signing_secret: "{{ grafana_signing_secret_vault }}"

pgadmin4_admin_username: "{{ pgadmin4_admin_email }}"
pgadmin4_admin_password: "{{ pgadmin4_admin_password_vault }}"

management_admin_username: "management-admin"
management_admin_password: "{{ management_admin_password_vault }}"
management_realm_admin_username: "management-realm-admin"
management_realm_admin_password: "{{ management_realm_admin_password_vault }}"

harbor_admin_username: "{{ harbor_admin_username_vault }}"
harbor_admin_password: "{{ harbor_admin_password_vault }}"
harbor_postgresql_password: "{{ harbor_postgresql_password_vault }}"

elastic_admin_username: "{{ elastic_admin_username_vault }}"
elastic_admin_password: "{{ elastic_admin_password_vault }}"

postgres_replicator_user_password: "{{ postgres_replicator_user_password_vault }}"

mysql_root_username: "{{ mysql_root_username_vault }}"
mysql_root_password: "{{ mysql_root_password_vault }}"

gitea_admin_username: "gitea-admin"
gitea_admin_password: "{{ gitea_admin_password_vault }}"
gitea_realm_admin_username: "gitea-realm-admin"
gitea_realm_admin_password: "gitea-realm-admin"

argocd_admin_username: "argocd-admin"
argocd_admin_password: "{{ argocd_admin_password_vault }}"
argo_keycloak_client_secret: "{{ argo_keycloak_client_secret_vault }}"
argocd_server_admin_password: "{{ argocd_server_admin_password_vault }}"

awx_admin_username: "awx-admin"
awx_admin_password: "{{ awx_admin_password_vault }}"

prometheus_admin_username: "prometheus-admin"
prometheus_admin_password: "{{ prometheus_admin_password_vault }}"
prometheus_admin_password_htpasswd: "{{ prometheus_admin_password_htpasswd_vault }}"

alertmanager_admin_username: "alertmanager-admin"
alertmanager_admin_password: "{{ alertmanager_admin_password_vault }}"
alertmanager_admin_password_htpasswd: "{{ alertmanager_admin_password_htpasswd_vault }}"

netgo_msteams_hook_cd: "{{ netgo_msteams_hook_cd_vault }}"
netgo_msteams_hook_alerting: "{{ netgo_msteams_hook_alerting_vault }}"

management_oidc_client_secret: "{{ management_oidc_client_secret_vault }}"

# smardigo automation {{ stage }} gpg key
# https://git.dev-at.de/smardigo-hetzner/communication-keys/
# push mirror: https://{{ stage }}-gitea-01.smardigo.digital/gitea-admin/communication-keys/
gpg_key_smardigo_automation__private: '{{ gpg_key_smardigo_automation__private__vault }}'
