summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-04-02 16:30:34 -0400
committerMicah Anderson <micah@riseup.net>2013-04-02 16:30:34 -0400
commit31cbf602f874ba16ef3504c004f41021fcad153b (patch)
tree2c45e9ec0dc71001754886d9e06285c4302d65d9 /manifests/init.pp
parent9740f84b96c3343436ade17cd31320e164b28874 (diff)
add $use_monkeysphere variable (default set to false) to enable non-monkeysphere deployments
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp20
1 files changed, 14 insertions, 6 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 9277ef0..3b564d4 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -2,6 +2,7 @@
class strongswan(
$manage_shorewall = false,
$shorewall_source = 'net',
+ $use_monkeysphere = false,
$monkeysphere_publish_key = false,
$ipsec_nat = false,
$default_left_ip_address = $::ipaddress,
@@ -10,9 +11,16 @@ class strongswan(
$auto_remote_host = false
) {
- class { 'monkeysphere':
- publish_key => $monkeysphere_publish_key
- } -> class { 'certtool': }
+ if $use_monkeysphere != false {
+ class { 'monkeysphere':
+ publish_key => $monkeysphere_publish_key
+ } -> class { 'certtool': }
+
+ $require_monkeysphere = $use_monkeysphere ? {
+ true => 'Class['monkeysphere']',
+ false => ''
+ }
+ }
case $::operatingsystem {
centos: {
@@ -23,7 +31,7 @@ class strongswan(
$binary = '/usr/sbin/ipsec'
class { 'strongswan::centos::five':
- require => Class['monkeysphere'],
+ require => $require_monkeysphere
}
}
default: {
@@ -31,7 +39,7 @@ class strongswan(
$cert_dir = '/etc/strongswan/ipsec.d'
$binary = '/usr/sbin/strongswan'
class { 'strongswan::centos::six':
- require => Class['monkeysphere'],
+ require => $require_monkeysphere
}
}
}
@@ -41,7 +49,7 @@ class strongswan(
$cert_dir = '/etc/ipsec.d'
$binary = '/usr/sbin/ipsec'
class { 'strongswan::base':
- require => Class['monkeysphere'],
+ require => $require_monkeysphere
}
}
}