You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: roles/prereq_python/README.md
+19-23Lines changed: 19 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,21 @@
1
1
# prereq_python
2
2
3
-
Install Python
3
+
Install Python and pip.
4
4
5
-
This role ensures that the correct versions of Python are installed on a host to meet the requirements of specified Cloudera Manager and Cloudera Runtime versions. It also handles the installation and update of the `pip` package manager for Python 3. For environments that still require Python 2, the role provides a flag to control whether the installation is done via the system package manager or from source.
5
+
This role ensures that the correct versions of Python are installed on a host to meet the requirements of specified Cloudera Manager and Cloudera Runtime versions. It also handles the installation and update of the `pip` package manager. For environments that still require Python 2, the role provides a flag to control whether the installation is done via the system package manager or from source.
6
6
7
7
To validate the required Python version for a given Cloudera Manager and Runtime, the [Cloudera on premise documentation](https://docs.cloudera.com/cdp-private-cloud-base/latest/installation/topics/cdpdc-cm-install-python-3.8.html) and the support matrix variables defined in the `cloudera.exe.prereq_supported` role are used.
8
8
9
9
The role will:
10
10
- Determine the required Python versions based on `cloudera_manager_version` and `cloudera_runtime_version`.
11
-
- Install the necessary Python 3 packages if a supported version is not already present.
12
-
- Install or update the `pip` package for Python 3.
13
-
- If Python 2 is required, install it either via the system's package manager (`python2_package_install: true`) or from source (`python2_package_install: false`).
14
-
- Ensure that the installed Python versions and `pip` are properly configured and accessible.
11
+
- Install the necessary Python packages if a supported version is not already present and installations and upgrades are enabled.
12
+
- Install or update the `pip` package for Python.
13
+
- Ensure that the installed Python versions and `pip` are properly configured and updated.
15
14
16
15
# Requirements
17
16
18
17
- Root or `sudo` privileges are required on the target host to install system packages.
19
18
- Network access to package repositories (for system packages) and PyPI (for pip).
20
-
- If installing Python 2 from source, the host will require build tools (e.g., `gcc`, `make`, development headers).
|`cloudera_manager_version`|`str`|`False`|`7.11.3`| The version of Cloudera Manager to use for determining Python version requirements. |
31
-
|`cloudera_runtime_version`|`str`|`False`|`7.1.9`| The version of Cloudera Runtime to use for determining Python version requirements. |
32
-
|`python3_package`|`str`|`False`| - |An optional name of the Python 3 package to install. This is only used when a supported version of Python 3 is not found. If not specified, the role will use OS-specific default package names. |
33
-
|`python3_pip_package`|`str`|`False`|`python-pip`| The name of the Python 3 Pip package to be installed or updated. |
34
-
|`python2_package_install`|`bool`|`False`|`true`| Flag to specify if Python 2 should be installed via the system package manager. If `false`, the role will attempt to install Python 2 from source. |
28
+
|`cloudera_manager_version`|`str`|`True`|| The version of Cloudera Manager to use for determining Python version requirements. |
29
+
|`cloudera_runtime_version`|`str`|`True`|| The version of Cloudera Runtime to use for determining Python version requirements. |
30
+
|`python_packages`|`list[str]`|`False`| - |Optional names of the Python packages to install. This is only used when a supported version of Python is not found. If not specified, the role will use OS-specific default package names. |
31
+
|`python_pip_packages`|`list[str]`|`False`|`[ python-pip ]`| The names of the Python pip packages to be installed or updated. |
32
+
|`prereq_python_upgrade`|`bool`|`False`|`true`| Flag to enable Python installation or upgrade if a supported version is not present. If `true`, the latest supported version or the `python_packages` will be installed. |
0 commit comments