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: docs/module_software_center_download.md
+88-7Lines changed: 88 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
## Description
4
4
The Ansible Module `software_center_download` automates downloading files from the SAP Software Center.
5
5
- It can find a file using a search query or download it directly using a specific download link and filename.
6
+
- Supports wildcard search to find and download specific versions (oldest/newest) from multiple available versions.
6
7
- If a file is not found via search, it can look for alternative versions.
7
8
- It supports checksum validation to ensure file integrity and avoid re-downloading valid files.
8
9
- The module can also perform a dry run to check for file availability without downloading.
@@ -18,6 +19,39 @@ This module requires the following Python modules to be installed on the target
18
19
19
20
## Execution
20
21
22
+
### Wildcard Search Format
23
+
The module supports wildcard search to find files across multiple versions. This is useful when you want to download the latest (or oldest) version of a software package without knowing the exact version number.
24
+
25
+
**Format:**`PREFIX*-ID.EXT`
26
+
27
+
Where:
28
+
29
+
-`PREFIX`: The software name prefix (e.g., `SAPEXE`, `SAPHOSTAGENT`).
30
+
-`*`: Single wildcard representing the version number.
31
+
-`-`: Dash separator (required).
32
+
-`ID`: File ID number (e.g., `80002630`).
33
+
-`.EXT`: File extension (e.g., `.SAR`, `.EXE`).
34
+
35
+
> **NOTE:** File ID is unique number that represents combination of component and platform version.
36
+
37
+
**Requirements:**
38
+
- The parameter `search_alternatives: true` must be enabled.
39
+
- Only one wildcard (`*`) is allowed per query.
40
+
- File format must include both dash and extension according to pattern above.
41
+
- Use `deduplicate` parameter to select oldest (`first`) or newest (`last`) version.
42
+
43
+
**Examples:**
44
+
-`SWPM20SP2*-80003424.SAR` - Matches all available SWPM20 versions starting with `2` (SWPM20SP23, SWPM20SP24, etc.) for `Linux on x86_64 64bit` (80003424).
45
+
-`SAPEXE_10*-80002630.SAR` - Matches all available SAPEXE_10 versions starting with `10` (SAPEXE_10, SAPEXE_100, SAPEXE_1000, etc.) for `Linux on Power LE 64bit` (80002630).
46
+
-`SAPHOSTAGENT*-80004822.SAR` - Matches all available SAPHOSTAGENT versions for `Linux on x86_64 64bit` (80004822).
47
+
48
+
**Special Files:**
49
+
Some SAP media files don't follow the standard naming pattern and require exact filenames:
50
+
51
+
-`S4CORE107_INST_EXPORT_1.zip`
52
+
-`KD75783.SAR`
53
+
-`19118000000000009032` (SAP Media downloaded with ID instead of Title).
54
+
21
55
### Execution Flow
22
56
The module follows a sophisticated logic flow to determine whether to download, skip, or fail. Here is a simplified breakdown of the decision-making process:
23
57
@@ -88,6 +122,31 @@ Download SAP Software file using download_link and download_filename
88
122
dest: "Enter download path (e.g. /software)"
89
123
```
90
124
125
+
Download latest version of SAP Software using wildcard search
126
+
```yaml
127
+
---
128
+
- name: Example play for Ansible Module software_center_download
129
+
hosts: all
130
+
tasks:
131
+
- name: Download latest SAPEXE version using wildcard
132
+
community.sap_launchpad.software_center_download:
133
+
suser_id: "Enter SAP S-User ID"
134
+
suser_password: "Enter SAP S-User Password"
135
+
search_query: "SAPEXE*-80002630.SAR"
136
+
dest: "Enter download path (e.g. /software)"
137
+
search_alternatives: true
138
+
deduplicate: "last"
139
+
140
+
- name: Download oldest SAPHOSTAGENT version using wildcard
141
+
community.sap_launchpad.software_center_download:
142
+
suser_id: "Enter SAP S-User ID"
143
+
suser_password: "Enter SAP S-User Password"
144
+
search_query: "SAPHOSTAGENT*-80004822.SAR"
145
+
dest: "Enter download path (e.g. /software)"
146
+
search_alternatives: true
147
+
deduplicate: "first"
148
+
```
149
+
91
150
Download list of SAP Software files, but search for alternatives if not found
92
151
```yaml
93
152
---
@@ -129,7 +188,7 @@ Download SAP Software file using Python Virtual Environment `/tmp/venv`
0 commit comments