Browse Source

Allow duplicate $required_packages

Previously, if more than one apt::source required the same packages to be
installed it would fail with a duplicate exec resource. This adds the name of
the source resource to the exec and gives the exec a name, moving it to a
command parameter for the exec.
Matthaus Litteken 12 years ago
parent
commit
f3735d2
1 changed files with 3 additions and 2 deletions
  1. 3 2
      manifests/source.pp

+ 3 - 2
manifests/source.pp

@@ -36,8 +36,9 @@ define apt::source(
   }
 
   if $required_packages != false {
-    exec { "${apt::params::provider} -y install ${required_packages}":
-      subscribe => File["${name}.list"],
+    exec { "Required packages: '${required_packages}' for ${name}":
+      command     => "${apt::params::provider} -y install ${required_packages}",
+      subscribe   => File["${name}.list"],
       refreshonly => true,
     }
   }