Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Modify apt::source release parameter test
[puppet-modules/puppetlabs-apt.git]
/
manifests
/
force.pp
diff --git
a/manifests/force.pp
b/manifests/force.pp
index ece532acd0578ac740eba49c324e3b1a559cdbbe..ec6f57e2ccdb540bf4c1cad82edc115beb863861 100644
(file)
--- a/
manifests/force.pp
+++ b/
manifests/force.pp
@@
-6,7
+6,12
@@
define apt::force(
$version = false
) {
$version = false
) {
- exec { "/usr/bin/aptitude -y -t ${release} install ${name}":
+ $version_string = $version ? {
+ false => undef,
+ default => "=${version}",
+ }
+
+ exec { "/usr/bin/aptitude -y -t ${release} install ${name}${version_string}":
unless => $version ? {
false => "/usr/bin/dpkg -s ${name} | grep -q 'Status: install'",
default => "/usr/bin/dpkg -s ${name} | grep -q 'Version: ${version}'"
unless => $version ? {
false => "/usr/bin/dpkg -s ${name} | grep -q 'Status: install'",
default => "/usr/bin/dpkg -s ${name} | grep -q 'Version: ${version}'"