Permalink
Browse files

OpenVPN NextGen module

  • Loading branch information...
alvagante committed May 5, 2012
0 parents commit 768b25e6470d49beeb547a0f28c56e18fb11ca52
Showing with 964 additions and 0 deletions.
  1. +11 −0 Modulefile
  2. +105 −0 README.rdoc
  3. +9 −0 Rakefile
  4. +441 −0 manifests/init.pp
  5. +113 −0 manifests/params.pp
  6. +22 −0 manifests/spec.pp
  7. +230 −0 spec/classes/openvpn_spec.rb
  8. +25 −0 spec/spec_helper.rb
  9. +8 −0 templates/spec.erb
@@ -0,0 +1,11 @@
+name 'lab42-openvpn'
+version '2.0.7'
+author 'Alessandro Franceschi'
+license 'Apache2'
+project_page 'http://www.example42.com'
+source 'https://github.com/example42/puppet-openvpn'
+summary 'Puppet module for openvpn'
+description 'This module installs and manages openvpn. Check README.rdoc for details. Puppi is required for some common functions: you can install them without using the whole module. Monitor and firewall dependencies are needed only if the relevant features are enabled'
+dependency 'lab42/puppi', '>= 2.0.0'
+dependency 'lab42/monitor', '>= 2.0.0'
+dependency 'lab42/firewall', '>= 2.0.0'
@@ -0,0 +1,105 @@
+= Puppet module: openvpn
+
+This is a Puppet module for openvpn based on the second generation layout ("NextGen") of Example42 Puppet Modules.
+
+Made by Alessandro Franceschi / Lab42
+
+Official site: http://www.example42.com
+
+Official git repository: http://github.com/example42/puppet-openvpn
+
+Released under the terms of Apache 2 License.
+
+This module requires functions provided by the Example42 Puppi module (you need it even if you don't use and install Puppi)
+
+For detailed info about the logic and usage patterns of Example42 modules check the DOCS directory on Example42 main modules set.
+
+== USAGE - Basic management
+
+* Install openvpn with default settings
+
+ class { 'openvpn': }
+
+* Install a specific version of openvpn package
+
+ class { 'openvpn':
+ version => '1.0.1',
+ }
+
+* Disable openvpn service.
+
+ class { 'openvpn':
+ disable => true
+ }
+
+* Remove openvpn package
+
+ class { 'openvpn':
+ absent => true
+ }
+
+* Enable auditing without without making changes on existing openvpn configuration files
+
+ class { 'openvpn':
+ audit_only => true
+ }
+
+
+== USAGE - Overrides and Customizations
+* Use custom sources for main config file
+
+ class { 'openvpn':
+ source => [ "puppet:///modules/lab42/openvpn/openvpn.conf-${hostname}" , "puppet:///modules/lab42/openvpn/openvpn.conf" ],
+ }
+
+
+* Use custom source directory for the whole configuration dir
+
+ class { 'openvpn':
+ source_dir => 'puppet:///modules/lab42/openvpn/conf/',
+ source_dir_purge => false, # Set to true to purge any existing file not present in $source_dir
+ }
+
+* Use custom template for main config file. Note that template and source arguments are alternative.
+
+ class { 'openvpn':
+ template => 'example42/openvpn/openvpn.conf.erb',
+ }
+
+* Automatically include a custom subclass
+
+ class { 'openvpn':
+ my_class => 'openvpn::example42',
+ }
+
+
+== USAGE - Example42 extensions management
+* Activate puppi (recommended, but disabled by default)
+
+ class { 'openvpn':
+ puppi => true,
+ }
+
+* Activate puppi and use a custom puppi_helper template (to be provided separately with a puppi::helper define ) to customize the output of puppi commands
+
+ class { 'openvpn':
+ puppi => true,
+ puppi_helper => 'myhelper',
+ }
+
+* Activate automatic monitoring (recommended, but disabled by default). This option requires the usage of Example42 monitor and relevant monitor tools modules
+
+ class { 'openvpn':
+ monitor => true,
+ monitor_tool => [ 'nagios' , 'monit' , 'munin' ],
+ }
+
+* Activate automatic firewalling. This option requires the usage of Example42 firewall and relevant firewall tools modules
+
+ class { 'openvpn':
+ firewall => true,
+ firewall_tool => 'iptables',
+ firewall_src => '10.42.0.0/24',
+ firewall_dst => $ipaddress_eth0,
+ }
+
@@ -0,0 +1,9 @@
+require 'rake'
+require 'rspec/core/rake_task'
+
+RSpec::Core::RakeTask.new(:test) do |t|
+ t.rspec_opts = ["--format", "doc", "--color"]
+ t.pattern = 'spec/*/*_spec.rb'
+end
+
+task :default => :test
Oops, something went wrong.

0 comments on commit 768b25e

Please sign in to comment.