Module openvpn
In: /modules/openvpn/manifests/init.pp
/modules/openvpn/manifests/secret.pp
/modules/openvpn/manifests/conf.pp
/modules/openvpn/manifests/startup-script.pp
/modules/openvpn/manifests/conftemplate.pp

Summary

Summary:OpenVPN module
Author:Matthias Saou <matthias@saou.eu>
License:Apache License 2.0
Updated:December 2011

Sample Usage

Basic OpenVPN setup :

    include openvpn
    openvpn::secret { 'example.key':
        source => 'puppet:///files/openvpn/example.key',
    }
    openvpn::conftemplate { 'example':
        dev => 'tun0',
        remote => 'remote-server.example.com',
        ipaddress_local => '192.168.0.1',
        ipaddress_remote => '192.168.0.2',
        routes => [ '192.168.1.0 255.255.255.0' ],
        secret => 'example.key',
    }

Defines

conf   conftemplate   secret  

Classes and Modules

Class openvpn::openvpn
Class openvpn::startup-script

Defines

conf( $source => 'undef', $content => 'undef', $dir => '/etc/openvpn' )

OpenVPN configuration from source or template. FIXME : Implement auto restart of the configured link after changes.

conftemplate( $secret, $dev, $ipaddress_local => 'ipaddress', $remote, $routes => [], $float => 'false', $dir => '/etc/openvpn', $port => '1194', $ipaddress_remote )
secret( $source => 'undef', $content => 'undef', $dir => '/etc/openvpn' )

The secret file must be manually generated and stored on the puppetmaster. To generate an OpenVPN secret file :

    openvpn --genkey --secret example.key

Usage :

    openvpn::secret { 'example.key':
        source => 'puppet:///files/openvpn/example.key',
    }

[Validate]