summaryrefslogtreecommitdiff
path: root/puppet/modules
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules')
-rw-r--r--puppet/modules/site_openvpn/manifests/init.pp9
-rw-r--r--puppet/modules/site_openvpn/manifests/server_config.pp2
2 files changed, 10 insertions, 1 deletions
diff --git a/puppet/modules/site_openvpn/manifests/init.pp b/puppet/modules/site_openvpn/manifests/init.pp
index 685871bd..4f900623 100644
--- a/puppet/modules/site_openvpn/manifests/init.pp
+++ b/puppet/modules/site_openvpn/manifests/init.pp
@@ -127,6 +127,13 @@ class site_openvpn {
subscribe => File['/usr/local/bin/add_gateway_ips.sh'],
}
+ exec { 'restart_openvpn':
+ command => '/etc/init.d/openvpn restart',
+ refreshonly => true,
+ subscribe => File['/etc/openvpn'],
+ require => [ Package['openvpn'], File['/etc/openvpn'] ];
+ }
+
cron { 'add_gateway_ips.sh':
command => '/usr/local/bin/add_gateway_ips.sh',
user => 'root',
@@ -142,6 +149,7 @@ class site_openvpn {
'openvpn':
ensure => installed;
}
+
service {
'openvpn':
ensure => running,
@@ -153,6 +161,7 @@ class site_openvpn {
file {
'/etc/openvpn':
ensure => directory,
+ notify => Exec['restart_openvpn'],
require => Package['openvpn'];
}
diff --git a/puppet/modules/site_openvpn/manifests/server_config.pp b/puppet/modules/site_openvpn/manifests/server_config.pp
index a2e769e1..6106cfbb 100644
--- a/puppet/modules/site_openvpn/manifests/server_config.pp
+++ b/puppet/modules/site_openvpn/manifests/server_config.pp
@@ -65,7 +65,7 @@ define site_openvpn::server_config(
mode => 644,
warn => true,
require => File['/etc/openvpn'],
- notify => Service['openvpn'];
+ notify => Exec['restart_openvpn'];
}
if $tls_remote != undef {