]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Don't use hardcoded provider in force manifest.
authorAndreas Teuchert <ant+github@teuchert.org>
Sat, 23 Feb 2013 15:45:31 +0000 (16:45 +0100)
committerHunter Haugen <h.haugen@gmail.com>
Wed, 3 Jul 2013 17:36:48 +0000 (10:36 -0700)
Use $apt::params::provider instead.

manifests/force.pp

index a1ec4a60882f0939882815a355d8e6caa4f394f9..152bb67354db6fa8960a20a942329f0cf5d7b147 100644 (file)
@@ -7,6 +7,8 @@ define apt::force(
   $timeout = 300
 ) {
 
+  $provider = $apt::params::provider
+
   $version_string = $version ? {
     false   => undef,
     default => "=${version}",
@@ -32,7 +34,7 @@ define apt::force(
     }
   }
 
-  exec { "/usr/bin/apt-get -y ${release_string} install ${name}${version_string}":
+  exec { "${provider} -y ${release_string} install ${name}${version_string}":
     unless    => $install_check,
     logoutput => 'on_failure',
     timeout   => $timeout,