summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2017-05-08 22:13:01 +0200
committermh <mh@immerda.ch>2017-05-08 22:13:01 +0200
commit33b575da9deec3f41896b8e2dfe9e6a89e57e83c (patch)
treeef509f5141d0c7cbda7ab42a8255b6ef5530af6d
parentdbc02ed9a962ef85739094f4a3cbd4ad009d0dde (diff)
try to be extra cautious when restarting and do it with the try, so nothing breaks if something is broken that is not connected at compile time
-rw-r--r--manifests/base.pp15
1 files changed, 8 insertions, 7 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index abf477b..c96e48f 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -65,10 +65,11 @@ class shorewall::base {
exec{'shorewall_check':
command => 'shorewall check',
refreshonly => true,
- notify => Service['shorewall'],
require => Package['shorewall'],
- }
- service{'shorewall':
+ } ~> exec{'shorewall_try':
+ command => 'shorewall try /etc/shorewall/puppet',
+ refreshonly => true,
+ } -> service{'shorewall':
ensure => running,
enable => true,
hasstatus => true,
@@ -92,15 +93,15 @@ class shorewall::base {
exec{'shorewall6_check':
command => 'shorewall6 check',
refreshonly => true,
- notify => Service['shorewall6'],
require => Package['shorewall6'],
- }
- service{'shorewall6':
+ } ~> exec{'shorewall6_try':
+ command => 'shorewall6 try /etc/shorewall6/puppet',
+ refreshonly => true,
+ } -> service{'shorewall6':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
- require => Exec['shorewall6_check'],
}
}