Fixed several lint warnings and errors
[puppet-modules/puppetlabs-apt.git] / manifests / force.pp
index 45c5679292b601c9d13954efc401b5377d071130..2d33e942dcda0a7ddfd564d5d69be95e85a4afb1 100644 (file)
@@ -3,7 +3,8 @@
 
 define apt::force(
   $release = 'testing',
-  $version = false
+  $version = false,
+  $timeout = 300
 ) {
 
   $version_string = $version ? {
@@ -15,8 +16,9 @@ define apt::force(
     false   => "/usr/bin/dpkg -s ${name} | grep -q 'Status: install'",
     default => "/usr/bin/dpkg -s ${name} | grep -q 'Version: ${version}'",
   }
-  exec { "/usr/bin/aptitude -y -t ${release} install ${name}${version_string}":
-    unless => $install_check,
+  exec { "/usr/bin/apt-get -y -t ${release} install ${name}${version_string}":
+    unless    => $install_check,
+    logoutput => 'on_failure',
+    timeout   => $timeout,
   }
-
 }