summaryrefslogtreecommitdiff
path: root/manifests/base.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-04-26 02:33:27 +0200
committermh <mh@immerda.ch>2011-04-26 02:33:27 +0200
commit7ec265e5c9879fa3b574c5c250ebac6877c66d3f (patch)
treee32f025a647a76b93753807fd363a1e74ec02e4e /manifests/base.pp
parent92ccdf4d110138ccfd752a92600e6653247613c2 (diff)
fix init script for centos
Diffstat (limited to 'manifests/base.pp')
-rw-r--r--manifests/base.pp15
1 files changed, 11 insertions, 4 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 2a9ce54..c89332f 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -9,6 +9,13 @@ class strongswan::base {
ensure => installed,
}
+ file{'/etc/init.d/ipsec':
+ source => "puppet:///modules/strongswan/centos/ipsec.init",
+ require => Package['strongswan'],
+ before => Service['ipsec'],
+ owner => root, group => 0, mode => 0755;
+ }
+
exec{ 'ipsec_privatekey':
command => "certtool --generate-privkey --bits 2048 --outfile /etc/ipsec.d/private/${fqdn}.pem",
creates => "/etc/ipsec.d/private/${fqdn}.pem",
@@ -25,7 +32,7 @@ class strongswan::base {
content => ": RSA ${fqdn}.pem\n",
require => Package['strongswan'],
owner => "root", group => 0, mode => "400",
- notify => Service['strongswan'],
+ notify => Service['ipsec'],
}
if $strongswan_cert != "false" and $strongswan_cert != "" {
@@ -34,7 +41,7 @@ class strongswan::base {
tag => 'strongswan_cert',
content => $strongswan_cert,
require => Package['strongswan'],
- notify => Service['strongswan'],
+ notify => Service['ipsec'],
}
}
@@ -44,10 +51,10 @@ class strongswan::base {
source => "puppet:///modules/site-strongswan/configs/${fqdn}",
owner => "root", group => 0, mode => "400",
require => Package['strongswan'],
- notify => Service['strongswan'],
+ notify => Service['ipsec'],
}
- service{ 'strongswan' :
+ service{'ipsec':
ensure => running,
enable => true,
}