From 8b238e121cadd731831eed032d880eff067aaedd Mon Sep 17 00:00:00 2001 From: linus Date: Fri, 3 Dec 2021 13:46:28 +0100 Subject: [PATCH] add templates to improve decalarativeness --- roles/server/templates/cidrs.j2 | 3 +++ roles/server/templates/peers.j2 | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 roles/server/templates/cidrs.j2 create mode 100644 roles/server/templates/peers.j2 diff --git a/roles/server/templates/cidrs.j2 b/roles/server/templates/cidrs.j2 new file mode 100644 index 0000000..f61a72c --- /dev/null +++ b/roles/server/templates/cidrs.j2 @@ -0,0 +1,3 @@ +{% for cidr in cidrs %} +- {"parent": {{ cidr.parent }}, "name": {{ cidr.name }}, "cidr": {{ cidr.cidr }}} +{% endfor %} diff --git a/roles/server/templates/peers.j2 b/roles/server/templates/peers.j2 new file mode 100644 index 0000000..6ce1703 --- /dev/null +++ b/roles/server/templates/peers.j2 @@ -0,0 +1,3 @@ +{% for peer in peers %} +- {"cidr": {{ peer.cidr }}, "name": {{ peer.name }}, "admin": {{ peer.admin }}} +{% endfor %}