Files
computer-playbook/roles/web-app-taiga/meta/volumes.yml
kevinveenbirkenbachandClaude Opus 5 750476b26a feat(lint): give every mount target one spot in meta/volumes.yml
A volume that reaches several services repeated its container path once per
mount. Written out each time it has no single point of truth: a rename that
misses one line still parses, still deploys, and mounts one service somewhere
nobody intended. Nothing fails until that service looks for content which is
not there.

YAML already solves this, and 62722a6ab used it here first -- web-app-openproject
anchors await_migrations_target and aliases it for the second service. Nineteen
roles now follow, and tests/lint/repository/spot/test_volumes_target_single_spot.py
fails on any target spelled out twice. An alias carries no path, so the rule
cannot see it, which is the point.

The conversion was mechanical and is provable rather than reviewed: every file
was rewritten and then reloaded, and any file whose yaml.safe_load result
differed from the original was discarded instead of kept. Nineteen written,
none discarded. Anchors and aliases are a serialisation form; the loader
resolves them before any consumer sees a document.

validate_volumes_meta over all 81 meta/volumes.yml reports no violation.
make test-lint: 328 passed.

web-app-prometheus carries two unrelated deletions: comments that predate this
change and fell under the comment lint once the file was touched. They explained
a 0444 mode and a compose-only bind; both facts are visible in the entries
themselves.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 02:02:29 +02:00

73 lines
2.7 KiB
YAML

---
async-rabbitmq-data:
type: volume
name: taiga_async_rabbitmq_data
mounts:
- service: async-rabbitmq
target: &var_lib_rabbitmq_target /var/lib/rabbitmq
events-rabbitmq-data:
type: volume
name: taiga_events_rabbitmq_data
mounts:
- service: events-rabbitmq
target: *var_lib_rabbitmq_target
media-data:
type: volume
name: taiga_media_data
mounts:
- service: taiga
target: &taiga_back_media_target /taiga-back/media
- service: async
target: *taiga_back_media_target
- service: gateway
target: /taiga/media
- service: manager
target: *taiga_back_media_target
static-data:
type: volume
name: taiga_static_data
mounts:
- service: taiga
target: &taiga_back_static_target /taiga-back/static
- service: async
target: *taiga_back_static_target
- service: gateway
target: /taiga/static
- service: manager
target: *taiga_back_static_target
frontend-conf:
type: config
source: "{{ [lookup('container', 'web-app-taiga', 'directories.config'), 'conf.json'] | path_join }}"
mode: "0444"
mounts:
- service: front
target: /usr/share/nginx/html/conf.json
when: "{{ (lookup('config', 'web-app-taiga', 'services.sso.enabled') | bool) or (lookup('config', 'web-app-taiga', 'services.ldap.enabled', false) | bool) }}"
config-append:
type: bind
source: "{{ [lookup('container', 'web-app-taiga', 'directories.config'), 'taiga-config.append.py'] | path_join }}"
mounts:
- service: taiga
target: &taiga_back_settings_config_append_py_target /taiga-back/settings/config.append.py
when: "{{ (lookup('config', 'web-app-taiga', 'services.sso.enabled') | bool) or (lookup('config', 'web-app-taiga', 'services.ldap.enabled', false) | bool) }}"
- service: async
target: *taiga_back_settings_config_append_py_target
when: "{{ (lookup('config', 'web-app-taiga', 'services.sso.enabled') | bool) or (lookup('config', 'web-app-taiga', 'services.ldap.enabled', false) | bool) }}"
urls-py:
type: bind
source: "{{ [lookup('container', 'web-app-taiga', 'directories.config'), 'taiga-urls.py'] | path_join }}"
mounts:
- service: taiga
target: &taiga_back_settings_urls_py_target /taiga-back/settings/urls.py
when: "{{ lookup('config', 'web-app-taiga', 'services.sso.enabled') | bool }}"
- service: async
target: *taiga_back_settings_urls_py_target
when: "{{ lookup('config', 'web-app-taiga', 'services.sso.enabled') | bool }}"
gateway-conf:
type: config
source: "{{ [lookup('container', 'web-app-taiga', 'directories.services'), 'repository/taiga-gateway/taiga.conf'] | path_join }}"
mode: "0444"
mounts:
- service: gateway
target: /etc/nginx/conf.d/default.conf