|
15 | 15 | present, installed: {
|
16 | 16 | $index_url_arg = $index_url ? {
|
17 | 17 | undef => '',
|
18 |
| - defaults => "--index_url=$index_url", |
| 18 | + defaults => "--index_url=${index_url}", |
19 | 19 | }
|
20 | 20 |
|
21 | 21 | if $version != undef {
|
22 |
| - $package_with_version = "$package==$version" |
23 |
| - $grep_for = "^$package_with_version$" |
| 22 | + $package_with_version = "${package}==${version}" |
| 23 | + $grep_for = "^${package_with_version}$" |
24 | 24 | } else {
|
25 | 25 | $package_with_version = $package
|
26 |
| - $grep_for = "^$package==" |
| 26 | + $grep_for = "^${package}==" |
27 | 27 | }
|
28 | 28 |
|
29 |
| - exec { "install-$package": |
30 |
| - command => "pip$python_version install $index_url_arg $package_with_version", |
31 |
| - unless => "pip$python_version freeze | grep '$grep_for'", |
| 29 | + exec { "install-${package}": |
| 30 | + command => "pip${python_version} install ${index_url_arg} ${package_with_version}", |
| 31 | + unless => "pip${python_version} freeze | grep '${grep_for}'", |
32 | 32 | }
|
33 | 33 | }
|
34 | 34 |
|
|
38 | 38 | }
|
39 | 39 |
|
40 | 40 | absent, purged: {
|
41 |
| - exec { "uninstall-$package": |
42 |
| - command => "pip$python_version uninstall $package -y", |
43 |
| - onlyif => "pip$python_version freeze | cut -d= -f1 | egrep '^$package$'", |
| 41 | + exec { "uninstall-${package}": |
| 42 | + command => "pip${python_version} uninstall ${package} -y", |
| 43 | + onlyif => "pip${python_version} freeze | cut -d= -f1 | egrep '^${package}$'", |
44 | 44 | }
|
45 | 45 | }
|
46 | 46 | }
|
|
0 commit comments