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 1111 }
1212
1313 case $ensure {
14- present: {
14+ present , installed : {
1515 if $version != undef {
1616 $package_with_version = " $package ==$version "
17+ $grep_for = " ^$package_with_version $"
1718 } else {
1819 $package_with_version = $package
20+ $grep_for = " ^$package =="
1921 }
2022
2123 exec { "install-$package" :
2224 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 '" ,
2426 }
2527 }
2628
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: {
2835 exec { "uninstall-$package" :
2936 command => " pip$python_version uninstall $package -y" ,
3037 onlyif => " pip$python_version freeze | cut -d= -f1 | egrep '^$package $'" ,
You can’t perform that action at this time.
0 commit comments