From 33b575da9deec3f41896b8e2dfe9e6a89e57e83c Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 8 May 2017 22:13:01 +0200 Subject: 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 --- manifests/base.pp | 15 ++++++++------- 1 file 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'], } } -- cgit v1.2.3