unify into peers variable

This commit is contained in:
linus 2021-12-03 13:47:18 +01:00
parent 325949f0c0
commit a2a1630dfb

View File

@ -27,14 +27,23 @@ cidrs:
## with 16,384 usable IP addresses
- { "parent": "fsfe", "name": "machines", "cidr": "10.200.64.0/18" }
admin_peers:
# humans > admins
- { "cidr": "admins", "name": "linus" }
- { "cidr": "admins", "name": "max-mehl" }
- { "cidr": "admins", "name": "albert" }
peers:
# machines
- { "cidr": "machines", "name": "meitner" }
- { "cidr": "machines", "name": "claus" }
- { "cidr": "machines", "name": "cont1-plutex" }
# humans > admins, e.g.
# - { "cidr": "admins", "name": "linus", "admin": "true" }
# humans > others, e.g.
# - { "cidr": "others", "name": "mk", "admin": "false" }
# - { "cidr": "others", "name": "fi", "admin": "false" }
# - { "cidr": "others", "name": "fani", "admin": "false" }
# machines, e.g.
# - { "cidr": "machines", "name": "cont1-plutex", "admin": "false" }
peers: "{{ peers_var|from_yaml }}"
peers_var: |
- { "cidr": "admins", "name": "linus", "admin": "true" }
- { "cidr": "admins", "name": "max-mehl", "admin": "true" }
- { "cidr": "admins", "name": "albert", "admin": "true" }
{% for host in groups['innernet_client'] %}
- {
"cidr": "machines",
"name": {{ host.replace('.', '-').replace('-fsfeurope-org', '') }},
"admin": "false"
}
{% endfor %}