mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
`make autoformat` rewrites roles/web-app-seaweedfs/vars/main.yml and tests/unit/python/roles/web-app-stalwart/test_store_guard.py on every checkout of main, so every quality gate on every branch leaves them as unstaged changes, and the gate lints a tree the commit does not carry. The YAML change folds one line of the `>-` scalar SEAWEEDFS_S3_ADMIN_CURL; the parsed value is identical. The Python change is ruff's line wrapping only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
2.5 KiB
YAML
44 lines
2.5 KiB
YAML
---
|
|
application_id: "web-app-seaweedfs"
|
|
entity_name: "{{ application_id | get_entity_name }}"
|
|
|
|
SEAWEEDFS_CONTAINER: "{{ lookup('config', application_id, 'services.seaweedfs.name') }}"
|
|
SEAWEEDFS_CONSUMER_COUNT: "{{ lookup('objstore_consumers', 'seaweedfs') | length }}"
|
|
SEAWEEDFS_CONTAINER_ADDRESS: "{{ lookup('container_address', application_id, 'seaweedfs') }}"
|
|
|
|
SEAWEEDFS_S3_PORT_INTERNAL: "{{ lookup('config', application_id, 'services.seaweedfs.api_port') }}"
|
|
SEAWEEDFS_FILER_PORT_INTERNAL: 8888
|
|
SEAWEEDFS_MASTER_PORT_INTERNAL: 9333
|
|
|
|
SEAWEEDFS_S3_PORT_PUBLIC: "{{ lookup('config', application_id, 'services.seaweedfs.ports.local.http') }}"
|
|
|
|
SEAWEEDFS_PROXY_CONTAINER: "{{ lookup('config', application_id, 'services.proxy.name') }}"
|
|
|
|
SEAWEEDFS_S3_DOMAIN: "{{ lookup('config', application_id, 'domains.canonical.api') }}"
|
|
SEAWEEDFS_FILER_DOMAIN: "{{ lookup('config', application_id, 'domains.canonical.filer') }}"
|
|
SEAWEEDFS_MASTER_DOMAIN: "{{ lookup('config', application_id, 'domains.canonical.master') }}"
|
|
|
|
SEAWEEDFS_ADMIN_ACCESS_KEY: "{{ lookup('users', 'administrator').username }}"
|
|
SEAWEEDFS_ADMIN_SECRET_KEY: "{{ lookup('users', 'administrator').password }}"
|
|
SEAWEEDFS_ADMIN_CREDENTIALS: "{{ SEAWEEDFS_ADMIN_ACCESS_KEY }}:{{ SEAWEEDFS_ADMIN_SECRET_KEY }}"
|
|
|
|
SEAWEEDFS_S3_REGION: "{{ lookup('config', application_id, 'services.seaweedfs.region') }}"
|
|
# Exception: curl expands the credential itself via --variable, because --user "$VAR" puts it on curl's argv, visible in the host's ps.
|
|
SEAWEEDFS_S3_ADMIN_CURL: >-
|
|
container exec -i -e SEAWEEDFS_ADMIN_CREDENTIALS {{ SEAWEEDFS_CONTAINER_ADDRESS }}
|
|
sh -c 'exec {{ lookup('timeout', 30) | curl(retries=0) }} -S --aws-sigv4 "aws:amz:{{ SEAWEEDFS_S3_REGION }}:s3" --variable %SEAWEEDFS_ADMIN_CREDENTIALS --expand-user
|
|
"{{ '{{' }}SEAWEEDFS_ADMIN_CREDENTIALS{{ '}}' }}" "$@"' curl
|
|
|
|
SEAWEEDFS_S3_CONFIG_PATH: "{{ [ lookup('container', application_id, 'directories.volumes'), 's3.json' ] | path_join }}"
|
|
|
|
SEAWEEDFS_SSO_PORT_PUBLIC: "{{ lookup('config', application_id, 'services.seaweedfs.ports.local.sso') }}"
|
|
SEAWEEDFS_FRONTEND_ENABLED: "{{ lookup('config', application_id, 'services.frontend.enabled') | bool }}"
|
|
SEAWEEDFS_FRONT_PROXY_MATRIX: >-
|
|
{{
|
|
([
|
|
{ 'domain': SEAWEEDFS_FILER_DOMAIN, 'http_port': SEAWEEDFS_SSO_PORT_PUBLIC },
|
|
{ 'domain': SEAWEEDFS_MASTER_DOMAIN, 'http_port': SEAWEEDFS_SSO_PORT_PUBLIC }
|
|
] if SEAWEEDFS_FRONTEND_ENABLED else [])
|
|
+ [{ 'domain': SEAWEEDFS_S3_DOMAIN, 'http_port': SEAWEEDFS_S3_PORT_PUBLIC }]
|
|
}}
|