|
55 | 55 | Enum['pip', 'pip3'] $pip_provider = 'pip', |
56 | 56 | Variant[Boolean, String] $url = false, |
57 | 57 | String[1] $owner = 'root', |
58 | | - $group = undef, |
| 58 | + $group = getparam(Class['python'], 'group'), |
59 | 59 | $umask = undef, |
60 | 60 | $index = false, |
61 | 61 | Variant[Boolean, String] $proxy = false, |
|
71 | 71 | ){ |
72 | 72 | $python_provider = getparam(Class['python'], 'provider') |
73 | 73 | $python_version = getparam(Class['python'], 'version') |
74 | | - if $group { |
75 | | - $_group = $group |
76 | | - } else { |
77 | | - $_group = getparam(Class['python'], 'group') |
78 | | - } |
| 74 | + |
79 | 75 | # Get SCL exec prefix |
80 | 76 | # NB: this will not work if you are running puppet from scl enabled shell |
81 | 77 | $exec_prefix = $python_provider ? { |
|
187 | 183 | command => "${wheel_check} ; { ${pip_install} ${install_args} \$wheel_support_flag ${pip_common_args}@${ensure}#egg=${egg_name} || ${pip_install} ${install_args} ${pip_common_args}@${ensure}#egg=${egg_name} ;}", |
188 | 184 | unless => "${pip_env} freeze --all | grep -i -e ${grep_regex}", |
189 | 185 | user => $owner, |
190 | | - group => $_group, |
| 186 | + group => $group, |
191 | 187 | umask => $umask, |
192 | 188 | cwd => $cwd, |
193 | 189 | environment => $environment, |
|
199 | 195 | command => "${wheel_check} ; { ${pip_install} ${install_args} \$wheel_support_flag ${pip_common_args} || ${pip_install} ${install_args} ${pip_common_args} ;}", |
200 | 196 | unless => "${pip_env} freeze --all | grep -i -e ${grep_regex}", |
201 | 197 | user => $owner, |
202 | | - group => $_group, |
| 198 | + group => $group, |
203 | 199 | umask => $umask, |
204 | 200 | cwd => $cwd, |
205 | 201 | environment => $environment, |
|
216 | 212 | command => "${wheel_check} ; { ${pip_install} ${install_args} \$wheel_support_flag ${pip_common_args}==${ensure} || ${pip_install} ${install_args} ${pip_common_args}==${ensure} ;}", |
217 | 213 | unless => "${pip_env} freeze --all | grep -i -e ${grep_regex} || ${pip_env} list | sed -e 's/[ ]\\+/==/' -e 's/[()]//g' | grep -i -e ${grep_regex}", |
218 | 214 | user => $owner, |
219 | | - group => $_group, |
| 215 | + group => $group, |
220 | 216 | umask => $umask, |
221 | 217 | cwd => $cwd, |
222 | 218 | environment => $environment, |
|
231 | 227 | command => "${wheel_check} ; { ${pip_install} \$wheel_support_flag ${pip_common_args} || ${pip_install} ${pip_common_args} ;}", |
232 | 228 | unless => "${pip_env} freeze --all | grep -i -e ${grep_regex} || ${pip_env} list | sed -e 's/[ ]\\+/==/' -e 's/[()]//g' | grep -i -e ${grep_regex}", |
233 | 229 | user => $owner, |
234 | | - group => $_group, |
| 230 | + group => $group, |
235 | 231 | umask => $umask, |
236 | 232 | cwd => $cwd, |
237 | 233 | environment => $environment, |
|
262 | 258 | command => "${wheel_check} ; { ${pip_install} --upgrade \$wheel_support_flag ${pip_common_args} || ${pip_install} --upgrade ${pip_common_args} ;}", |
263 | 259 | unless => $unless_command, |
264 | 260 | user => $owner, |
265 | | - group => $_group, |
| 261 | + group => $group, |
266 | 262 | umask => $umask, |
267 | 263 | cwd => $cwd, |
268 | 264 | environment => $environment, |
|
277 | 273 | command => "echo y | ${pip_env} uninstall ${uninstall_args} ${proxy_flag} ${name}", |
278 | 274 | onlyif => "${pip_env} freeze --all | grep -i -e ${grep_regex}", |
279 | 275 | user => $owner, |
280 | | - group => $_group, |
| 276 | + group => $group, |
281 | 277 | umask => $umask, |
282 | 278 | cwd => $cwd, |
283 | 279 | environment => $environment, |
|
0 commit comments