#+CAPTION: [[file:private/vars.yml][=private/vars.yml=]]
#+BEGIN_SRC conf :tangle private/vars.yml
-private_net: "{{ private_net_cidr | ipaddr('network') }}"
-private_net_mask: "{{ private_net_cidr | ipaddr('netmask') }}"
-private_net_and_mask: "{{ private_net }} {{ private_net_mask }}"
-public_vpn_net: "{{ public_vpn_net_cidr | ipaddr('network') }}"
-public_vpn_net_mask: "{{ public_vpn_net_cidr | ipaddr('netmask') }}"
+private_net:
+ "{{ private_net_cidr | ansible.utils.ipaddr('network') }}"
+private_net_mask:
+ "{{ private_net_cidr | ansible.utils.ipaddr('netmask') }}"
+private_net_and_mask:
+ "{{ private_net }} {{ private_net_mask }}"
+public_vpn_net:
+ "{{ public_vpn_net_cidr | ansible.utils.ipaddr('network') }}"
+public_vpn_net_mask:
+ "{{ public_vpn_net_cidr | ansible.utils.ipaddr('netmask') }}"
public_vpn_net_and_mask:
"{{ public_vpn_net }} {{ public_vpn_net_mask }}"
-campus_vpn_net: "{{ campus_vpn_net_cidr | ipaddr('network') }}"
-campus_vpn_net_mask: "{{ campus_vpn_net_cidr | ipaddr('netmask') }}"
+campus_vpn_net:
+ "{{ campus_vpn_net_cidr | ansible.utils.ipaddr('network') }}"
+campus_vpn_net_mask:
+ "{{ campus_vpn_net_cidr | ansible.utils.ipaddr('netmask') }}"
campus_vpn_net_and_mask:
"{{ campus_vpn_net }} {{ campus_vpn_net_mask }}"
-gate_wifi_net: "{{ gate_wifi_net_cidr | ipaddr('network') }}"
-gate_wifi_net_mask: "{{ gate_wifi_net_cidr | ipaddr('netmask') }}"
+gate_wifi_net:
+ "{{ gate_wifi_net_cidr | ansible.utils.ipaddr('network') }}"
+gate_wifi_net_mask:
+ "{{ gate_wifi_net_cidr | ansible.utils.ipaddr('netmask') }}"
gate_wifi_net_and_mask:
"{{ gate_wifi_net }} {{ gate_wifi_net_mask }}"
-gate_wifi_broadcast: "{{ gate_wifi_net_cidr | ipaddr('broadcast') }}"
+gate_wifi_broadcast:
+ "{{ gate_wifi_net_cidr | ansible.utils.ipaddr('broadcast') }}"
#+END_SRC
The institute prefers to configure its services with IP addresses
#+CAPTION: [[file:private/vars.yml][=private/vars.yml=]]
#+BEGIN_SRC conf :tangle private/vars.yml
-core_addr_cidr: "{{ private_net_cidr | ipaddr('1') }}"
-gate_addr_cidr: "{{ private_net_cidr | ipaddr('2') }}"
-gate_wifi_addr_cidr: "{{ gate_wifi_net_cidr | ipaddr('1') }}"
-wifi_wan_addr_cidr: "{{ gate_wifi_net_cidr | ipaddr('2') }}"
-front_private_addr_cidr: "{{ public_vpn_net_cidr | ipaddr('1') }}"
-
-core_addr: "{{ core_addr_cidr | ipaddr('address') }}"
-gate_addr: "{{ gate_addr_cidr | ipaddr('address') }}"
-gate_wifi_addr: "{{ gate_wifi_addr_cidr | ipaddr('address') }}"
-wifi_wan_addr: "{{ wifi_wan_addr_cidr | ipaddr('address') }}"
+core_addr_cidr: "{{ private_net_cidr | ansible.utils.ipaddr('1') }}"
+gate_addr_cidr: "{{ private_net_cidr | ansible.utils.ipaddr('2') }}"
+gate_wifi_addr_cidr:
+ "{{ gate_wifi_net_cidr | ansible.utils.ipaddr('1') }}"
+wifi_wan_addr_cidr:
+ "{{ gate_wifi_net_cidr | ansible.utils.ipaddr('2') }}"
+front_private_addr_cidr:
+ "{{ public_vpn_net_cidr | ansible.utils.ipaddr('1') }}"
+
+core_addr: "{{ core_addr_cidr | ansible.utils.ipaddr('address') }}"
+gate_addr: "{{ gate_addr_cidr | ansible.utils.ipaddr('address') }}"
+gate_wifi_addr:
+ "{{ gate_wifi_addr_cidr | ansible.utils.ipaddr('address') }}"
+wifi_wan_addr:
+ "{{ wifi_wan_addr_cidr | ansible.utils.ipaddr('address') }}"
front_private_addr:
- "{{ front_private_addr_cidr | ipaddr('address') }}"
+ "{{ front_private_addr_cidr | ansible.utils.ipaddr('address') }}"
#+END_SRC
file "/etc/bind/db.domain";
};
-zone "{{ private_net_cidr | ipaddr('revdns')
+zone "{{ private_net_cidr | ansible.utils.ipaddr('revdns')
| regex_replace('^0\.','') }}" {
type master;
file "/etc/bind/db.private";
};
-zone "{{ public_vpn_net_cidr | ipaddr('revdns')
+zone "{{ public_vpn_net_cidr | ansible.utils.ipaddr('revdns')
| regex_replace('^0\.','') }}" {
type master;
file "/etc/bind/db.public_vpn";
};
-zone "{{ campus_vpn_net_cidr | ipaddr('revdns')
+zone "{{ campus_vpn_net_cidr | ansible.utils.ipaddr('revdns')
| regex_replace('^0\.','') }}" {
type master;
file "/etc/bind/db.campus_vpn";
campus_vpn_net_cidr: 10.84.138.0/24
gate_wifi_net_cidr: 192.168.57.0/24
-private_net: "{{ private_net_cidr | ipaddr('network') }}"
-private_net_mask: "{{ private_net_cidr | ipaddr('netmask') }}"
-private_net_and_mask: "{{ private_net }} {{ private_net_mask }}"
-public_vpn_net: "{{ public_vpn_net_cidr | ipaddr('network') }}"
-public_vpn_net_mask: "{{ public_vpn_net_cidr | ipaddr('netmask') }}"
+private_net:
+ "{{ private_net_cidr | ansible.utils.ipaddr('network') }}"
+private_net_mask:
+ "{{ private_net_cidr | ansible.utils.ipaddr('netmask') }}"
+private_net_and_mask:
+ "{{ private_net }} {{ private_net_mask }}"
+public_vpn_net:
+ "{{ public_vpn_net_cidr | ansible.utils.ipaddr('network') }}"
+public_vpn_net_mask:
+ "{{ public_vpn_net_cidr | ansible.utils.ipaddr('netmask') }}"
public_vpn_net_and_mask:
"{{ public_vpn_net }} {{ public_vpn_net_mask }}"
-campus_vpn_net: "{{ campus_vpn_net_cidr | ipaddr('network') }}"
-campus_vpn_net_mask: "{{ campus_vpn_net_cidr | ipaddr('netmask') }}"
+campus_vpn_net:
+ "{{ campus_vpn_net_cidr | ansible.utils.ipaddr('network') }}"
+campus_vpn_net_mask:
+ "{{ campus_vpn_net_cidr | ansible.utils.ipaddr('netmask') }}"
campus_vpn_net_and_mask:
"{{ campus_vpn_net }} {{ campus_vpn_net_mask }}"
-gate_wifi_net: "{{ gate_wifi_net_cidr | ipaddr('network') }}"
-gate_wifi_net_mask: "{{ gate_wifi_net_cidr | ipaddr('netmask') }}"
+gate_wifi_net:
+ "{{ gate_wifi_net_cidr | ansible.utils.ipaddr('network') }}"
+gate_wifi_net_mask:
+ "{{ gate_wifi_net_cidr | ansible.utils.ipaddr('netmask') }}"
gate_wifi_net_and_mask:
"{{ gate_wifi_net }} {{ gate_wifi_net_mask }}"
-gate_wifi_broadcast: "{{ gate_wifi_net_cidr | ipaddr('broadcast') }}"
-
-core_addr_cidr: "{{ private_net_cidr | ipaddr('1') }}"
-gate_addr_cidr: "{{ private_net_cidr | ipaddr('2') }}"
-gate_wifi_addr_cidr: "{{ gate_wifi_net_cidr | ipaddr('1') }}"
-wifi_wan_addr_cidr: "{{ gate_wifi_net_cidr | ipaddr('2') }}"
-front_private_addr_cidr: "{{ public_vpn_net_cidr | ipaddr('1') }}"
-
-core_addr: "{{ core_addr_cidr | ipaddr('address') }}"
-gate_addr: "{{ gate_addr_cidr | ipaddr('address') }}"
-gate_wifi_addr: "{{ gate_wifi_addr_cidr | ipaddr('address') }}"
-wifi_wan_addr: "{{ wifi_wan_addr_cidr | ipaddr('address') }}"
+gate_wifi_broadcast:
+ "{{ gate_wifi_net_cidr | ansible.utils.ipaddr('broadcast') }}"
+
+core_addr_cidr: "{{ private_net_cidr | ansible.utils.ipaddr('1') }}"
+gate_addr_cidr: "{{ private_net_cidr | ansible.utils.ipaddr('2') }}"
+gate_wifi_addr_cidr:
+ "{{ gate_wifi_net_cidr | ansible.utils.ipaddr('1') }}"
+wifi_wan_addr_cidr:
+ "{{ gate_wifi_net_cidr | ansible.utils.ipaddr('2') }}"
+front_private_addr_cidr:
+ "{{ public_vpn_net_cidr | ansible.utils.ipaddr('1') }}"
+
+core_addr: "{{ core_addr_cidr | ansible.utils.ipaddr('address') }}"
+gate_addr: "{{ gate_addr_cidr | ansible.utils.ipaddr('address') }}"
+gate_wifi_addr:
+ "{{ gate_wifi_addr_cidr | ansible.utils.ipaddr('address') }}"
+wifi_wan_addr:
+ "{{ wifi_wan_addr_cidr | ansible.utils.ipaddr('address') }}"
front_private_addr:
- "{{ front_private_addr_cidr | ipaddr('address') }}"
+ "{{ front_private_addr_cidr | ansible.utils.ipaddr('address') }}"
core_ethernet: enp0s3
file "/etc/bind/db.domain";
};
- zone "{{ private_net_cidr | ipaddr('revdns')
+ zone "{{ private_net_cidr | ansible.utils.ipaddr('revdns')
| regex_replace('^0\.','') }}" {
type master;
file "/etc/bind/db.private";
};
- zone "{{ public_vpn_net_cidr | ipaddr('revdns')
+ zone "{{ public_vpn_net_cidr | ansible.utils.ipaddr('revdns')
| regex_replace('^0\.','') }}" {
type master;
file "/etc/bind/db.public_vpn";
};
- zone "{{ campus_vpn_net_cidr | ipaddr('revdns')
+ zone "{{ campus_vpn_net_cidr | ansible.utils.ipaddr('revdns')
| regex_replace('^0\.','') }}" {
type master;
file "/etc/bind/db.campus_vpn";