File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 11
11
}
12
12
13
13
case $ensure {
14
- present: {
14
+ present , installed : {
15
15
if $version != undef {
16
16
$package_with_version = " $package ==$version "
17
+ $grep_for = " ^$package_with_version $"
17
18
} else {
18
19
$package_with_version = $package
20
+ $grep_for = " ^$package =="
19
21
}
20
22
21
23
exec { "install-$package" :
22
24
command => " pip$python_version install $package_with_version " ,
23
- unless => " pip$python_version freeze | grep '^ $package_with_version $ '" ,
25
+ unless => " pip$python_version freeze | grep '$grep_for '" ,
24
26
}
25
27
}
26
28
27
- absent: {
29
+ latest: {
30
+ # TODO Read from https://pypi.python.org/pypi/<package_name>/json
31
+ # Probably best if implemented in Ruby
32
+ }
33
+
34
+ absent , purged: {
28
35
exec { "uninstall-$package" :
29
36
command => " pip$python_version uninstall $package -y" ,
30
37
onlyif => " pip$python_version freeze | cut -d= -f1 | egrep '^$package $'" ,
You can’t perform that action at this time.
0 commit comments