aboutsummaryrefslogtreecommitdiff
path: root/personal_infra/puppet/modules/proxmox/templates
diff options
context:
space:
mode:
Diffstat (limited to 'personal_infra/puppet/modules/proxmox/templates')
-rw-r--r--personal_infra/puppet/modules/proxmox/templates/interfaces.epp18
1 files changed, 18 insertions, 0 deletions
diff --git a/personal_infra/puppet/modules/proxmox/templates/interfaces.epp b/personal_infra/puppet/modules/proxmox/templates/interfaces.epp
new file mode 100644
index 00000000..e0bfeceb
--- /dev/null
+++ b/personal_infra/puppet/modules/proxmox/templates/interfaces.epp
@@ -0,0 +1,18 @@
+auto lo
+iface lo inet loopback
+
+auto eno1
+iface eno1 inet static
+ address <%= $network['ip'] %>
+ netmask <%= $network['netmask'] %>
+ gateway <%= $network['gateway'] %>
+
+auto vmbr0
+iface vmbr0 inet static
+ address <%= $network['proxmox']['ip'] %>
+ netmask <%= $network['proxmox']['netmask'] %>
+ bridge_ports none
+ bridge_stp off
+ bridge_fd 0
+ post-up echo 1 > /proc/sys/net/ipv4/ip_forward
+ post-up iptables -t nat -A POSTROUTING -s '<%= $network['proxmox']['network'] %>' -o eno1 -j MASQUERADE