Ensure ordering for package, service and defaults
authorMicah Anderson <micah@riseup.net>
Tue, 14 Jun 2016 14:42:04 +0000 (10:42 -0400)
committerMicah Anderson <micah@riseup.net>
Tue, 14 Jun 2016 14:42:04 +0000 (10:42 -0400)
manifests/debian.pp
manifests/init.pp

index bde1e21..1135b98 100644 (file)
@@ -5,13 +5,15 @@ class stunnel::debian inherits stunnel::linux {
   }
 
   Service['stunnel'] {
-    name => 'stunnel4',
-    pattern => '/usr/bin/stunnel4',
+    name      => 'stunnel4',
+    pattern   => '/usr/bin/stunnel4',
+    subscribe => File['/etc/default/stunnel4'],
+    require   => Package['stunnel4']
   }
 
   file { '/etc/default/stunnel4':
     content => template('stunnel/Debian/default'),
-    require => Package['stunnel4'],
+    before  => Package['stunnel4'],
     notify  => Service['stunnel4'],
     owner   => root,
     group   => 0,
index f38a202..9e7d87a 100644 (file)
@@ -58,6 +58,7 @@ class stunnel (
   }
 
   exec { 'refresh_stunnel':
-    command     => "${stunnel_staging}/bin/refresh_stunnel.sh"
+    command => "${stunnel_staging}/bin/refresh_stunnel.sh",
+    require => [ Package['stunnel4'], File['/etc/default/stunnel4'] ]
   }
 }