diff --git a/respondd/alias.json b/respondd/alias.json index 8524efd..3d506f7 100644 --- a/respondd/alias.json +++ b/respondd/alias.json @@ -8,7 +8,7 @@ "contact": "hilfe@ffmuc.net" }, "system": { - "domain_code": "ffmuc_{{ site }}", + "domain_code": "{{ prefix }}_{{ site }}", "role": "gateway" }, "pages": [ diff --git a/respondd/init.sls b/respondd/init.sls index 9aff581..f6b5a0a 100644 --- a/respondd/init.sls +++ b/respondd/init.sls @@ -10,7 +10,9 @@ python3-netifaces: pkg.installed -{% for site in salt['pillar.get']('netbox:config_context:sites').values()|sum(start=[]) %} +{% set sites = salt['pillar.get']('netbox:config_context:sites') %} +{% for prefix, domains in sites.items() %} +{% for site in domains %} {% if not salt['file.directory_exists']('/opt/respondd-' ~ site ) %} /opt/respondd-{{ site }}: @@ -64,4 +66,4 @@ respondd@{{ site }}: - file: /opt/respondd-{{ site }}/config.json - file: /etc/systemd/system/respondd@.service {% endfor %} - +{% endfor %}