summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp62
1 files changed, 22 insertions, 40 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index a3dd70c..173b9bd 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,45 +1,27 @@
-# openvpn.pp
-
+# == Class: openvpn
+#
+# This module installs the openvpn service, configures vpn endpoints, generates
+# client certificates, and generates client config files
+#
+#
+# === Examples
+#
+# * Installation:
+# class { 'openvpn': }
+#
+#
+# === Authors
+#
+# * Raffael Schmid <mailto:raffael@yux.ch>
+# * John Kinsella <mailto:jlkinsel@gmail.com>
+# * Justin Lambert <mailto:jlambert@letsevenup.com>
+#
class openvpn {
- package {
- 'openvpn':
- ensure => installed;
- }
- service {
- 'openvpn':
- ensure => running,
- enable => true,
- hasrestart => true,
- hasstatus => true,
- require => Exec['concat_/etc/default/openvpn'];
- }
- file {
- '/etc/openvpn':
- ensure => directory,
- require => Package['openvpn'];
- }
- file {
- '/etc/openvpn/keys':
- ensure => directory,
- require => File['/etc/openvpn'];
- }
-
- include concat::setup
- concat {
- '/etc/default/openvpn':
- owner => root,
- group => root,
- mode => 644,
- warn => true,
- notify => Service['openvpn'];
- }
+ class {'openvpn::install': } ->
+ class {'openvpn::config': } ~>
+ class {'openvpn::service': } ->
+ Class['openvpn']
- concat::fragment {
- 'openvpn.default.header':
- content => template('openvpn/etc-default-openvpn.erb'),
- target => '/etc/default/openvpn',
- order => 01;
- }
}