Add a way to specify a timeout for the apt::force define.
authorsathlan <mypublicaddress-code@yahoo.com>
Mon, 9 Jul 2012 02:24:49 +0000 (05:24 +0300)
committersathlan <mypublicaddress-code@yahoo.com>
Mon, 9 Jul 2012 02:24:49 +0000 (05:24 +0300)
manifests/force.pp

index d3d5962d0889a5975c81d62b8acd468015319ea2..75634b476dd8fe7cac2517cbdbefcc89b758dc13 100644 (file)
@@ -3,7 +3,8 @@
 
 define apt::force(
   $release = 'testing',
-  $version = false
+  $version = false,
+  $timeout = 300
 ) {
 
   $version_string = $version ? {
@@ -18,5 +19,6 @@ define apt::force(
   exec { "/usr/bin/aptitude -y -t ${release} install ${name}${version_string}":
     unless    => $install_check,
     logoutput => 'on_failure',
+    timeout   => $timeout,
   }
 }