|
4 | 4 | # |
5 | 5 | # === Parameters |
6 | 6 | # |
| 7 | +# [*ensure*] |
| 8 | +# Desired installation state for the Python package. Valid options are absent, |
| 9 | +# present and latest. Default: present |
| 10 | +# |
7 | 11 | # [*version*] |
8 | 12 | # Python version to install. Beware that valid values for this differ a) by |
9 | 13 | # the provider you choose and b) by the osfamily/operatingsystem you are using. |
|
17 | 21 | # package, if available on your osfamily. |
18 | 22 | # |
19 | 23 | # [*pip*] |
20 | | -# Install python-pip. Default: true |
| 24 | +# Desired installation state for python-pip. Boolean values are deprecated. |
| 25 | +# Default: present |
| 26 | +# Allowed values: 'absent', 'present', 'latest' |
21 | 27 | # |
22 | 28 | # [*dev*] |
23 | | -# Install python-dev. Default: false |
| 29 | +# Desired installation state for python-dev. Boolean values are deprecated. |
| 30 | +# Default: absent |
| 31 | +# Allowed values: 'absent', 'present', 'latest' |
24 | 32 | # |
25 | 33 | # [*virtualenv*] |
26 | | -# Install python-virtualenv. Default: false, also accepts 'pip' which will |
27 | | -# install latest virtualenv from pip rather than package manager |
| 34 | +# Desired installation state for python-virtualenv. Boolean values are |
| 35 | +# deprecated. Default: absent |
| 36 | +# Allowed values: 'absent', 'present', 'latest |
28 | 37 | # |
29 | 38 | # [*gunicorn*] |
30 | | -# Install Gunicorn. Default: false |
| 39 | +# Desired installation state for Gunicorn. Boolean values are deprecated. |
| 40 | +# Default: absent |
| 41 | +# Allowed values: 'absent', 'present', 'latest' |
31 | 42 | # |
32 | 43 | # [*manage_gunicorn*] |
33 | 44 | # Allow Installation / Removal of Gunicorn. Default: true |
34 | 45 | # |
35 | 46 | # [*provider*] |
36 | | -# What provider to use for installation of the packages, except gunicorn. |
37 | | -# Default: system default provider |
| 47 | +# What provider to use for installation of the packages, except gunicorn and |
| 48 | +# Python itself. Default: system default provider |
38 | 49 | # Allowed values: 'pip' |
39 | 50 | # |
40 | 51 | # [*use_epel*] |
|
44 | 55 | # |
45 | 56 | # class { 'python': |
46 | 57 | # version => 'system', |
47 | | -# pip => true, |
48 | | -# dev => true, |
49 | | -# virtualenv => true, |
50 | | -# gunicorn => true, |
| 58 | +# pip => 'present', |
| 59 | +# dev => 'present', |
| 60 | +# virtualenv => 'present', |
| 61 | +# gunicorn => 'present', |
51 | 62 | # } |
52 | 63 | # |
53 | 64 | # === Authors |
|
85 | 96 |
|
86 | 97 | validate_re($ensure, ['^(absent|present|latest)$']) |
87 | 98 | validate_re($version, concat(['system', 'pypy'], $valid_versions)) |
88 | | - validate_bool($gunicorn) |
| 99 | + |
| 100 | + if $pip == false or $pip == true { |
| 101 | + warning('Use of boolean values for the $pip parameter is deprecated') |
| 102 | + } else { |
| 103 | + validate_re($pip, ['^(absent|present|latest)$']) |
| 104 | + } |
| 105 | + |
| 106 | + if $virtualenv == false or $virtualenv == true { |
| 107 | + warning('Use of boolean values for the $virtualenv parameter is deprecated') |
| 108 | + } else { |
| 109 | + validate_re($virtualenv, ['^(absent|present|latest)$']) |
| 110 | + } |
| 111 | + |
| 112 | + if $virtualenv == false or $virtualenv == true { |
| 113 | + warning('Use of boolean values for the $virtualenv parameter is deprecated') |
| 114 | + } else { |
| 115 | + validate_re($virtualenv, ['^(absent|present|latest)$']) |
| 116 | + } |
| 117 | + |
| 118 | + if $gunicorn == false or $gunicorn == true { |
| 119 | + warning('Use of boolean values for the $gunicorn parameter is deprecated') |
| 120 | + } else { |
| 121 | + validate_re($gunicorn, ['^(absent|present|latest)$']) |
| 122 | + } |
| 123 | + |
89 | 124 | validate_bool($manage_gunicorn) |
90 | 125 | validate_bool($use_epel) |
91 | 126 |
|
|
0 commit comments