Load roles/matrix-synapse/vars/workers.yml earlier to not break --tags=setup-nginx-proxy

If we load it at runtime, during matrix-synapse role execution,
it's good enough for matrix-synapse and all roles after that,
but.. it breaks when someone uses `--tags=setup-nginx-proxy` alone.

The downside of including this vars file like this in `setup.yml`
is that the variables contained in it cannot be overriden by the user
(in their inventory's `vars.yml`).
... but it's not like overriding these variables was possible anyway
when including them at runtime.
This commit is contained in:
Slavi Pantaleev 2021-01-24 20:17:10 +02:00
parent 92ee3d78a0
commit cc5cf0d725
2 changed files with 3 additions and 3 deletions

View file

@ -1,8 +1,5 @@
---
- name: Load list of available worker apps and endpoints
include_vars: "{{ role_path }}/vars/workers.yml"
- name: Ensure synapse worker base service file installed
template:
src: "{{ role_path }}/templates/synapse/systemd/matrix-synapse-worker@.service.j2"

View file

@ -3,6 +3,9 @@
hosts: "{{ target if target is defined else 'matrix_servers' }}"
become: true
vars_files:
- roles/matrix-synapse/vars/workers.yml
roles:
- matrix-base
- matrix-dynamic-dns