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/sap_software_download/README.md
+95-8Lines changed: 95 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,22 @@ The Ansible Role `sap_software_download` is used to download SAP Software Media
8
8
<!-- END Description -->
9
9
10
10
<!-- BEGIN Dependencies -->
11
+
## Dependencies
12
+
This role requires the following Python modules to be installed on the target node (the machine where SAP software will be downloaded):
13
+
14
+
- wheel
15
+
- urllib3
16
+
- requests
17
+
- beautifulsoup4
18
+
- lxml
19
+
20
+
The role installs these modules if they are not already present. Installation can be done in one of the following ways:
21
+
22
+
-**Virtual Environment (Default):**
23
+
- When `sap_software_download_use_venv` is `true` (default), a temporary virtual environment is created, and modules are installed via `pip`.
24
+
- The Python version is determined by `sap_software_download_python_interpreter`.
25
+
-**System Environment:**
26
+
- When `sap_software_download_use_venv` is `false`, modules are installed directly into the system's Python environment using OS packages specified by `sap_software_download_python_module_packages`.
11
27
<!-- END Dependencies -->
12
28
13
29
<!-- BEGIN Prerequisites -->
@@ -34,13 +50,14 @@ The target node must meet the following requirements:
34
50
2.**Python Environment Preparation:** The role prepares the Python environment:
35
51
***Virtual Environment (Default):** A temporary Python virtual environment is created, and all necessary dependencies are installed within it.
36
52
***System Environment:** Alternatively, if `sap_software_download_use_venv` is set to `false`, dependencies are installed directly into the system's default Python environment.
37
-
3.**Maintenance Plan File List:** If the `sap_software_download_mp_transaction` variable is provided, the role retrieves the list of files associated with the specified Maintenance Plan transaction.
38
-
4.**File Relationship Validation:** If `sap_software_download_validate_relationships` is `true`, the role performs validation checks on the relationships between the files to be downloaded.
53
+
3.**Validate provided S-User credentials** The role will search for `SAPCAR` file to validate credentials and download authorization.
54
+
4.**Maintenance Plan File List:** If the `sap_software_download_mp_transaction` variable is provided, the role retrieves the list of files associated with the specified Maintenance Plan transaction.
55
+
5.**File Relationship Validation:** If `sap_software_download_validate_relationships` is `true`, the role performs validation checks on the relationships between the files to be downloaded.
39
56
***Alternative File Search:** If `sap_software_download_find_alternatives` is `true`, the role will search for alternative files if the requested files are not found.
40
57
* More information about validation logic is available at [Explanation of relationship validation logic](#explanation-of-relationship-validation-logic)
41
-
5.**Maintenance Plan File Download:** If `sap_software_download_mp_transaction` is provided, the role downloads the files associated with the Maintenance Plan.
42
-
6.**Direct File Download:** If `sap_software_download_files` is provided, the role downloads the specified files.
43
-
7.**Virtual Environment Cleanup:** If a temporary Python virtual environment was used, it is removed.
58
+
6.**Maintenance Plan File Download:** If `sap_software_download_mp_transaction` is provided, the role downloads the files associated with the Maintenance Plan.
59
+
7.**Direct File Download:** If `sap_software_download_files` is provided, the role downloads the specified files.
60
+
8.**Virtual Environment Cleanup:** If a temporary Python virtual environment was used, it is removed.
44
61
45
62
<!-- END Execution Flow -->
46
63
@@ -81,6 +98,62 @@ Download of SAP Software files using Maintenance Plan
81
98
sap_software_download_directory: "/software"
82
99
sap_software_download_mp_transaction: 'Transaction Name or Display ID from Maintenance Planner'
83
100
```
101
+
102
+
Combined download of SAP Software files and Maintenance Plan transaction together with settings:
103
+
- Use default Python instead of Python virtual environment
104
+
- No validation of S-User credentials
105
+
- No validation of relationships
106
+
- No warnings for unavailable files
107
+
- No warnings for unavailable Maintenance Plan transaction
sap_software_download_suser_id: "Enter SAP S-User ID"
151
+
sap_software_download_suser_password: "Enter SAP S-User Password"
152
+
sap_software_download_directory: "/software"
153
+
sap_software_download_files:
154
+
- 'SAPCAR_1115-70006178.EXE'
155
+
- 'SAPEXE_100-80005509.SAR'
156
+
```
84
157
<!-- END Execution Example -->
85
158
86
159
<!-- BEGIN Role Tags -->
@@ -93,20 +166,20 @@ Validation is executed for known combinations of files, where we can validate th
93
166
Example for SAP HANA Database Server 2.0 with LCAPPS and AFL.<br>
94
167
95
168
1. All files are examined, and a file starting with `IMDB_SERVER2` is found: `IMDB_SERVER20_084_0-80002031.SAR (Revision 2.00.084.0 (SPS08))`. This indicates a SAP HANA 2.0 database server file.
96
-
2. The HANA version and revision are extracted from the file name: `HANA 2.0`, `Revision 084`.
169
+
2. The HANA version and revision are extracted from the file name: `HANA 2.0`, `Version 084`.
97
170
3. Validation for HANA 1.0 is skipped because it expects files starting with `IMDB_SERVER1`. The following steps are only for `IMDB_SERVER2` (HANA 2.0).
98
171
4. All files are examined for files starting with `IMDB_LCAPPS_2` (indicating LCAPPS for HANA 2.0). Then the list is filtered to only include files starting with `IMDB_LCAPPS_2084` (indicating LCAPPS for HANA 2.0 revision 084).
99
172
5. Validation will have two outcomes:
100
173
- A file like `IMDB_LCAPPS_2084_0-20010426.SAR` is present. In this case, validation will pass because the LCAPPS version is compatible with the HANA revision.
101
174
- No file starting with `IMDB_LCAPPS_2084` is present, but there are files starting with `IMDB_LCAPPS_2`.<br>
102
175
This indicates a mismatch because the LCAPPS version is not compatible with the specific HANA revision (084) found in step 2.<br>
103
-
In this case, validation will fail. This can be prevented by setting `sap_software_download_ignore_relationship_warning` to `true`.
176
+
In this case, validation will fail. This can be ignored by setting `sap_software_download_ignore_relationship_warning` to `true`.
104
177
6. All files are examined for files starting with `IMDB_AFL20` (indicating AFL for HANA 2.0). Then the list is filtered to only include files starting with `IMDB_AFL20_084` (indicating AFL for HANA 2.0 revision 084).
105
178
7. Validation will have two outcomes:
106
179
- A file like `IMDB_AFL20_084_1-80001894.SAR` is present. In this case, validation will pass because the AFL version is compatible with the HANA revision.
107
180
- No file starting with `IMDB_AFL20_084` is present, but there are files starting with `IMDB_AFL20`.<br>
108
181
This indicates a mismatch because the AFL version is not compatible with the specific HANA revision (084) found in step 2.<br>
109
-
In this case, validation will fail. This can be prevented by setting `sap_software_download_ignore_relationship_warning` to `true`.
182
+
In this case, validation will fail. This can be ignored by setting `sap_software_download_ignore_relationship_warning` to `true`.
110
183
111
184
This validation example checks major and minor release (SPS and Revision), but it does not validate patch version.
112
185
<!-- END Further Information -->
@@ -125,6 +198,7 @@ Apache 2.0
125
198
<!-- BEGIN Role Variables -->
126
199
### sap_software_download_python_interpreter
127
200
- _Type:_ `string`<br>
201
+
- _Default:_ **Determined by the operating system.**<br>
128
202
129
203
The Python interpreter executable to use when creating a Python virtual environment.<br>
130
204
**Mandatory** when `sap_software_download_use_venv` is `true`.<br>
0 commit comments