# 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}" } }