aboutsummaryrefslogtreecommitdiff
path: root/manifests/openvpn/interface.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/openvpn/interface.pp')
-rw-r--r--manifests/openvpn/interface.pp10
1 files changed, 10 insertions, 0 deletions
diff --git a/manifests/openvpn/interface.pp b/manifests/openvpn/interface.pp
new file mode 100644
index 0000000..60c61e2
--- /dev/null
+++ b/manifests/openvpn/interface.pp
@@ -0,0 +1,10 @@
+# this configures a specific tun interface for the given subnet
+define virtual::openvpn::interface($subnet) {
+ # create and setup the interface if it doesn't exist already
+ # this is a "bit" coarse grained but works for me
+ ifupdown::manual {
+ $name:
+ up => "/var/lib/puppet/modules/virtual/openvpn/create_interface ${name} ${subnet}",
+ down => "/var/lib/puppet/modules/virtual/openvpn/destroy_interface ${name} ${subnet}"
+ }
+}