The directory resource for managing the chroot should be a variable
authorHunter Haugen <h.haugen@gmail.com>
Wed, 29 Aug 2012 20:55:08 +0000 (13:55 -0700)
committerHunter Haugen <h.haugen@gmail.com>
Wed, 29 Aug 2012 21:12:48 +0000 (14:12 -0700)
manifests/init.pp

index 93c7e17..2feacf2 100644 (file)
@@ -105,7 +105,7 @@ class haproxy (
       }
     }
 
-    file { '/var/lib/haproxy':
+    file { $haproxy_global_options['chroot']:
       ensure => directory,
       before => Service['haproxy'],
     }
@@ -124,6 +124,9 @@ class haproxy (
     name       => 'haproxy',
     hasrestart => true,
     hasstatus  => true,
-    require    => Concat['/etc/haproxy/haproxy.cfg'],
+    require    => [
+      Concat['/etc/haproxy/haproxy.cfg'],
+      File[$haproxy_global_options['chroot']],
+    ],
   }
 }