|
50 | 50 | } |
51 | 51 | } |
52 | 52 |
|
53 | | - package { 'python': |
54 | | - ensure => $python::ensure, |
55 | | - name => $python, |
| 53 | + if $python::manage_python_package { |
| 54 | + package { 'python': |
| 55 | + ensure => $python::ensure, |
| 56 | + name => $python, |
| 57 | + } |
56 | 58 | } |
57 | 59 |
|
58 | | - package { 'virtualenv': |
59 | | - ensure => $venv_ensure, |
60 | | - name => "${python}-virtualenv", |
61 | | - require => Package['python'], |
| 60 | + if $python::manage_virtualenv_package { |
| 61 | + package { 'virtualenv': |
| 62 | + ensure => $venv_ensure, |
| 63 | + name => "${python}-virtualenv", |
| 64 | + require => Package['python'], |
| 65 | + } |
62 | 66 | } |
63 | 67 |
|
64 | 68 | case $python::provider { |
65 | 69 | 'pip': { |
66 | 70 |
|
67 | | - package { 'pip': |
68 | | - ensure => $pip_ensure, |
69 | | - require => Package['python'], |
| 71 | + if $python::manage_pip_package { |
| 72 | + package { 'pip': |
| 73 | + ensure => $pip_ensure, |
| 74 | + require => Package['python'], |
| 75 | + } |
70 | 76 | } |
71 | 77 |
|
72 | 78 | if $pythondev { |
|
205 | 211 | version => 'pip3', |
206 | 212 | } |
207 | 213 | } else { |
208 | | - package { 'python-pip': |
209 | | - ensure => $pip_ensure, |
210 | | - require => Package['python'], |
211 | | - provider => 'yum', |
| 214 | + if $python::manage_pip_package { |
| 215 | + package { 'python-pip': |
| 216 | + ensure => $pip_ensure, |
| 217 | + require => Package['python'], |
| 218 | + provider => 'yum', |
| 219 | + } |
212 | 220 | } |
213 | 221 | } |
214 | 222 | if $pythondev { |
|
222 | 230 |
|
223 | 231 | } |
224 | 232 | default: { |
225 | | - package { 'pip': |
226 | | - ensure => $pip_ensure, |
227 | | - require => Package['python'], |
| 233 | + if $python::manage_pip_package { |
| 234 | + package { 'pip': |
| 235 | + ensure => $pip_ensure, |
| 236 | + require => Package['python'], |
| 237 | + } |
228 | 238 | } |
229 | 239 | if $pythondev { |
230 | 240 | package { 'python-dev': |
|
242 | 252 | if $pip_ensure != 'absent' { |
243 | 253 | if $python::use_epel == true { |
244 | 254 | include 'epel' |
245 | | - Class['epel'] -> Package['pip'] |
246 | | - Class['epel'] -> Package['python'] |
| 255 | + if $python::manage_pip_package { Class['epel'] -> Package['pip'] } |
| 256 | + if $python::manage_python_package { Class['epel'] -> Package['python'] } |
247 | 257 | } |
248 | 258 | } |
249 | 259 | if ($venv_ensure != 'absent') and ($facts['os']['release']['full'] =~ /^6/) { |
|
0 commit comments