diff --git a/salt/profile/matrix/config.sls b/salt/profile/matrix/config.sls index 0deffae..8f8ddb4 100644 --- a/salt/profile/matrix/config.sls +++ b/salt/profile/matrix/config.sls @@ -66,7 +66,7 @@ workers_nginx_file: {% set workers = salt['pillar.get']('profile:matrix:workers') %} {% for app, types in workers.items() %} -{% for type in types.items() %} +{% for type in types %} {% for worker, port in type.get('workers').items() %} /etc/matrix-synapse/workers/{{worker}}.yaml: file.managed: diff --git a/salt/profile/matrix/files/workers.nginx b/salt/profile/matrix/files/workers.nginx index 17dff87..b651fac 100644 --- a/salt/profile/matrix/files/workers.nginx +++ b/salt/profile/matrix/files/workers.nginx @@ -1,7 +1,7 @@ {% set workers = salt['pillar.get']('profile:matrix:workers') %} {% for app, types in workers.items() %} -{% for type in types.items() %} +{% for type in types %} upstream {{ app }}_{{ loop.index }} { {{ type.get('upstream_balancing') }} diff --git a/salt/profile/matrix/init.sls b/salt/profile/matrix/init.sls index fd2ce94..faf7496 100644 --- a/salt/profile/matrix/init.sls +++ b/salt/profile/matrix/init.sls @@ -13,7 +13,7 @@ synapse_restart: {% set workers = salt['pillar.get']('profile:matrix:workers') %} {% for app, types in workers.items() %} -{% for type in types.items() %} +{% for type in types %} {% for worker, port in type.get('workers').items() %} {{worker}}_service: