Skip to content

Commit

Permalink
Fix respondd site prefixes on gateways
Browse files Browse the repository at this point in the history
  • Loading branch information
DasSkelett authored Nov 30, 2023
1 parent 53a8cf4 commit bff6ee1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion respondd/alias.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"contact": "[email protected]"
},
"system": {
"domain_code": "ffmuc_{{ site }}",
"domain_code": "{{ prefix }}_{{ site }}",
"role": "gateway"
},
"pages": [
Expand Down
6 changes: 4 additions & 2 deletions respondd/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}:
Expand Down Expand Up @@ -64,4 +66,4 @@ respondd@{{ site }}:
- file: /opt/respondd-{{ site }}/config.json
- file: /etc/systemd/system/[email protected]
{% endfor %}

{% endfor %}

0 comments on commit bff6ee1

Please sign in to comment.