Skip to content

merge dev to main for release 1.2.0 #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f1fe7e8
fix: remove py shebang which cause errors with py venv
sean-freeman Nov 9, 2024
6590b7f
feat: query_latest module feature
marcelmamula Mar 21, 2025
b9392cd
feat: enhanced dry_run, updated naming of variables and parameters
marcelmamula Mar 25, 2025
71b2bd8
feat: enhance search logic for existing files
marcelmamula Mar 25, 2025
181dcb3
new return parameters for role consumption and improved result output
marcelmamula Mar 26, 2025
ff4c332
rename dest argument to download_path
marcelmamula Mar 26, 2025
031ca2c
Merge pull request #28 from marcelmamula/latest
marcelmamula Mar 26, 2025
a259405
fix for CD media with numerical names not skipping existing
marcelmamula Mar 27, 2025
19096c7
Merge pull request #30 from marcelmamula/pr28fix
marcelmamula Mar 27, 2025
045395b
feat: display_id handling and rename dest arg
marcelmamula Mar 27, 2025
7578647
updated description of transaction_name argument
marcelmamula Mar 27, 2025
2ff9535
Merge pull request #31 from marcelmamula/planid
marcelmamula Mar 27, 2025
8572ecd
feat: new role sap_software_download
marcelmamula Mar 27, 2025
fb109c5
feat: hana validation readme, defaults update
marcelmamula Mar 28, 2025
6290717
feat: add dry run connection check, improve verbosity
marcelmamula Mar 31, 2025
ef1204d
fix: cache gigya sdk build number
sean-freeman Mar 31, 2025
1cc9d31
Merge pull request #33 from sean-freeman/dev
sean-freeman Mar 31, 2025
024f083
feat: response error handling, SPS version, verbosity, plan debug
marcelmamula Apr 1, 2025
2631c71
feat: python default module packages
marcelmamula Apr 1, 2025
8fde2ee
feat: readme rework and preparation for 1.2.0
marcelmamula Apr 2, 2025
a69f5fc
update changelog with release PR
marcelmamula Apr 2, 2025
a986832
fix: ansible-lint corrections
marcelmamula Apr 2, 2025
bd62af7
fix: ansible-lint corrections
marcelmamula Apr 2, 2025
cc9e7ce
revert back download_path to dest
marcelmamula Apr 3, 2025
45adb76
revert download_path to dest
marcelmamula Apr 3, 2025
56f42ba
update redhat variable files
marcelmamula Apr 3, 2025
e5eab87
Merge pull request #32 from marcelmamula/role
marcelmamula Apr 4, 2025
08f9a03
fix: adjusted documentation after review
marcelmamula Apr 4, 2025
5f70b2c
feat: Download stack XML option
marcelmamula Apr 4, 2025
1ce5a9c
Update readme and changelog
marcelmamula Apr 4, 2025
8ade420
Merge pull request #35 from marcelmamula/stack
marcelmamula Apr 4, 2025
f41e30d
Merge pull request #34 from marcelmamula/readme
marcelmamula Apr 4, 2025
b250714
doc: Update changelog for release
marcelmamula Apr 4, 2025
5fd8038
Merge pull request #36 from marcelmamula/changelog
marcelmamula Apr 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# Collection wide lint-file
# DO NOT CHANGE
exclude_paths:
- .ansible/
- .cache/
- .github/
# - docs/
- changelogs/
- playbooks/
- tests/
enable_list:
- yaml
skip_list:
# We don't want to enforce new Ansible versions for Galaxy:
- meta-runtime[unsupported-version]
# We do not want to use checks which are marked as experimental:
- experimental
# We use ignore_errors for all the assert tasks, which should be acceptable:
- ignore-errors
# We want to allow single digit version numbers in a role's meta/main.yml file:
- schema
# Allow templating inside name because it creates more detailed output:
- name[template]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ __pycache__/
# VSCode
.vscode

.ansible
63 changes: 52 additions & 11 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,36 +1,77 @@
===================================
community.sap_launchpad Release Notes
community.sap\_launchpad Release Notes
===================================

.. contents:: Topics

v1.2.0
======

Release Summary
---------------

Enhancements to Modules and introduction of new Ansible Role.

Minor Changes
-------------
- sap_software_download: New Ansible Role with enhanced logic for downloading software using Ansible Module software_center_download (https://github.com/sap-linuxlab/community.sap_launchpad/pull/32)
- sap_software_download: Download stack XML option (https://github.com/sap-linuxlab/community.sap_launchpad/pull/35)
- software_center_download: Add option to search for latest packages (https://github.com/sap-linuxlab/community.sap_launchpad/pull/28)
- maintenance_planner modules: Add option to use Display ID instead of name (https://github.com/sap-linuxlab/community.sap_launchpad/pull/31)
- Collection Readme update and preparation for 1.2.0 release (https://github.com/sap-linuxlab/community.sap_launchpad/pull/34)

v1.1.0
Bugfixes
--------

- fix: cache gigya sdk build number (https://github.com/sap-linuxlab/community.sap_launchpad/pull/33)


v1.1.1
======

Release Summary
---------------

| Release Date: 2023-11-28
| Community contribution Ansible Module systems_info to query registered systems in me.sap.com
| Community contribution Ansible Module license_keys to create systems and license keys on me.sap.com/licensekey
Various bug fixes

Bugfixes
--------
- Append logic for Account Temporarily Locked Out
- Fix errors in the example file

v1.0.1

v1.1.0 (2023-11-28)
======

Release Summary
---------------

| Release Date: 2023-09-14
| Fix for handling old password prompt
Community contribution with new Ansible Modules `systems_info` and `license_keys``

Minor Changes
-------------

- Create/update systems and license keys (https://github.com/sap-linuxlab/community.sap_launchpad/pull/16)


v1.0.1 (2023-09-14)
======

Release Summary
---------------

Various bug fixes

Bugfixes
--------

- Fix for handling old password prompt


v1.0.0
v1.0.0 (2023-08-22)
======

Release Summary
---------------

| Release Date: 2023-08-22
| Initial Release on Galaxy
Initial Release on Galaxy
159 changes: 91 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,131 @@
# community.sap_launchpad Ansible Collection ![Ansible Lint](https://github.com/sap-linuxlab/community.sap_launchpad/actions/workflows/ansible-lint.yml/badge.svg?branch=main)
# community.sap_launchpad Ansible Collection

This Ansible Collection executes basic SAP.com Support operations tasks.
![Ansible Lint](https://github.com/sap-linuxlab/community.sap_launchpad/actions/workflows/ansible-lint.yml/badge.svg?branch=main)

## Functionality
## Description

This Ansible Collection executes basic SAP.com Support operations tasks, including:
This Ansible Collection provides roles and modules to automate interaction with SAP Launchpad API, primarily focusing on downloading software and files from the SAP Software Download Center and Maintenance Planner.

- **Software Center Catalog**
- Search and Download of SAP software center catalog files
- Search and Extraction of SAP software center catalog information
- **Maintenance Planner**
- Lookup and download files from an existing 'New Implementation' MP Transaction and Stack, using SAP software center's download basket
Included role and modules cover range of options:
- Preparation of environment before download.
- Download of specific SAP Software files.
- Download of alternative SAP Software files if specific was not available.
- Download of SAP Software files from existing Maintenance Plan transaction.
- Download of Stack file from existing Maintenance Plan transaction.
- Register Systems and License Keys
- Query registered Systems

## Contents

An Ansible Playbook can call either an Ansible Role, or the individual Ansible Modules for handling the API calls to various SAP Support Portal API capabilities:
- **Ansible Roles** (runs multiple Ansible Modules)
- **Ansible Modules** (and adjoining Python Functions)
## Requirements

For further information regarding the development, code structure and execution workflow please read the [Development documentation](./docs/DEVELOPMENT.md).
### Control Nodes
| Type | Version |
| :--- | :--- |
| Operating system | Any operating system with required Python and Ansible versions |
| Python | 3.11 or higher |
| Ansible | 9.9 or higher |
| Ansible-core | 2.16 or higher |

Within this Ansible Collection, there are various Ansible Modules.

#### Ansible Modules
### Managed Nodes
| Type | Version |
| :--- | :--- |
| Operating system | SUSE Linux Enterprise Server 15 SP5+, 16 <br> Red Hat Enterprise Linux 8.x, 9.x, 10.x |
| Python | 3.11 or higher (SUSE) <br> 3.9 or higher (Red Hat) |

| Name &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp; | Summary |
| :-- | :-- |
| [sap_launchpad.software_center_download](./docs/module_software_center_download.md) | search for files and download |
| [sap_launchpad.maintenance_planner_files](./docs/module_maintenance_planner_files.md) | maintenance planner files retrieval |
| [sap_launchpad.maintenance_planner_stack_xml_download](./docs/module_maintenance_planner_stack_xml_download.md) | maintenance planner stack xml download |
**NOTE: Operating system needs to have access to required package repositories either directly or via subscription registration.**

## Execution

### Credentials - SAP User ID
## Installation Instructions

SAP software installation media must be obtained from SAP directly, and requires valid license agreements with SAP in order to access these files.
### Installation
Install this collection with Ansible Galaxy command:
```console
ansible-galaxy collection install community.sap_launchpad
```

An SAP Company Number (SCN) contains one or more Installation Number/s, providing licences for specified SAP Software. When an SAP User ID is created within the SAP Customer Number (SCN), the administrator must provide SAP Download authorizations for the SAP User ID.
Optionally you can include collection in requirements.yml file and include it together with other collections using: `ansible-galaxy collection install -r requirements.yml`
Requirements file need to be maintained in following format:
```yaml
collections:
- name: community.sap_launchpad
```

When an SAP User ID (e.g. S-User) is enabled with and part of an SAP Universal ID, then the `sap_launchpad` Ansible Collection **must** use:
- the SAP User ID
- the password for login with the SAP Universal ID
### Upgrade
Installed Ansible Collection will not be upgraded automatically when Ansible package is upgraded.

In addition, if a SAP Universal ID is used then the recommendation is to check and reset the SAP User ID ‘Account Password’ in the [SAP Universal ID Account Manager](https://account.sap.com/manage/accounts), which will help to avoid any potential conflicts.
To upgrade the collection to the latest available version, run the following command:
```console
ansible-galaxy collection install community.sap_launchpad --upgrade
```

For further information regarding connection errors, please see the FAQ section [Errors with prefix 'SAP SSO authentication failed - '](./docs/FAQ.md#errors-with-prefix-sap-sso-authentication-failed---).
You can also install a specific version of the collection, when you encounter issues with latest version. Please report these issues in affected Role repository if that happens.
Example of downgrading collection to version 1.0.0:
```
ansible-galaxy collection install community.sap_launchpad:==1.0.0
```

### Execution examples
See [Installing collections](https://docs.ansible.com/ansible/latest/collections_guide/collections_installing.html) for more details on installation methods.

There are various methods to execute the Ansible Collection, dependant on the use case. For more information, see [Execution examples with code samples](./docs/EXEC_EXAMPLES.md) and the summary below:

| Execution Scenario | Use Case | Target |
| --- | --- | --- |
| Ansible Playbook <br/>-> source Ansible Collection <br/>-> execute Ansible Task <br/>--> run Ansible Module <br/>---> run Python/Bash Functions | Simple executions with a few activities | Localhost or Remote |
| Ansible Playbook <br/>-> source Ansible Collection <br/>-> execute Ansible Task <br/>--> run Ansible Role <br/>---> run Ansible Module <br/>----> run Python/Bash Functions <br/>--> run Ansible Role<br/>---> ... | Complex executions with various interlinked activities;<br/> run in parallel or sequentially | Localhost or Remote |
| Python/Bash Functions | Simple testing or non-Ansible use cases | Localhost |
## Contents

---
### Ansible Modules
| Name | Summary |
| :-- | :-- |
| [sap_launchpad.software_center_download](./docs/module_software_center_download.md) | Search and download SAP Software file |
| [sap_launchpad.maintenance_planner_files](./docs/module_maintenance_planner_files.md) | Get list of files from Maintenance Planner |
| [sap_launchpad.maintenance_planner_stack_xml_download](./docs/module_maintenance_planner_stack_xml_download.md) | Get stack file from Maintenance Planner |

## Requirements, Dependencies and Testing
### Ansible Roles
| Name | Summary |
| :-- | :-- |
| [sap_software_download](./roles/sap_software_download/README.md) | Prepare environment and download SAP Software files or Maintenance Plan transaction files |

### Operating System requirements

Designed for Linux operating systems, e.g. RHEL.
## Testing
This Ansible Collection was tested across different Operating Systems and SAP products.

This role has not been tested and amended for SAP NetWeaver Application Server instantiations on IBM AIX or Windows Server.
| Type | Version |
| :--- | :--- |
| Operating system | SUSE Linux Enterprise Server 15 SP5+, 16 <br> Red Hat Enterprise Linux 8.x, 9.x, 10.x |
| Python | 3.11, 3.12 |
| Ansible | 9, 10, 11 |
| Ansible-core | 2.16, 2.17, 2.18 |

Assumptions for executing this role include:
- Registered OS License and OS Package repositories are available (from the relevant content delivery network of the OS vendor)
- Simultaneous Ansible Playbook executions will require amendment of Ansible Variable name `softwarecenter_search_list` shown in execution samples (containing the list of installation media to download). This avoids accidental global variable clashes from occuring in Ansible Playbooks executed from the same controller host with an inline Ansible Inventory against 'all' target hosts.

### Python requirements
## Contributing
You can find more information about ways you can contribute at [sap-linuxlab website](https://sap-linuxlab.github.io/initiative_contributions/).

Execution/Controller/Management host:
- Python 3

Target host:
- Python 3, with Python Modules `beautifulsoup4 lxml requests` (see [Execution examples with code samples](./docs/EXEC_EXAMPLES.md))
## Support
You can report any issues using [Issues](https://github.com/sap-linuxlab/community.sap_launchpad/issues) section.

### Testing on execution/controller host

**Tests with Ansible Core release versions:**
- Ansible Core 2.11.5 community edition
## Release Notes and Roadmap
You can find the release notes of this collection in [Changelog file](./CHANGELOG.rst)

**Tests with Python release versions:**
- Python 3.9.7 (i.e. CPython distribution)

**Tests with Operating System release versions:**
- RHEL 8.4
- macOS 11.6 (Big Sur), with Homebrew used for Python 3.x via PyEnv
## Further Information

### Testing on target/remote host
### Credentials - SAP S-User

**Tests with Operating System release versions:**
- RHEL 8.2 for SAP
SAP software files must be obtained from SAP directly, and requires valid license agreements with SAP in order to access these files.

**Tests with Python release versions:**
- Python 3.6.x (i.e. CPython distribution), default for RHEL 8.x and SLES 15.x
- Python 3.8.x (i.e. CPython distribution)
An SAP Company Number (SCN) contains one or more Installation Number/s, providing licenses for specified SAP Software. When an SAP User ID is created within the SAP Customer Number (SCN), the administrator must provide SAP Download authorizations for the SAP User ID.

## License
When an SAP User ID (e.g. S-User) is enabled with and part of an SAP Universal ID, then the `sap_launchpad` Ansible Collection **must** use:
- the SAP User ID
- the password for login with the SAP Universal ID

- [Apache 2.0](./LICENSE)
In addition, if a SAP Universal ID is used then the recommendation is to check and reset the SAP User ID ‘Account Password’ in the [SAP Universal ID Account Manager](https://account.sap.com/manage/accounts), which will help to avoid any potential conflicts.

## Contributors
For further information regarding connection errors, please see the FAQ section [Errors with prefix 'SAP SSO authentication failed - '](./docs/FAQ.md#errors-with-prefix-sap-sso-authentication-failed---).

**Multi Factor Authentication is not supported.**

Contributors to the Ansible Roles within this Ansible Collection, are shown within [/docs/contributors](./docs/CONTRIBUTORS.md).
### Variable Precedence Rules
Please follow [Ansible Precedence guidelines](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable) on how to pass variables when using this collection.

## License
[Apache 2.0](./LICENSE)
50 changes: 30 additions & 20 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
ancestor: null
releases:

1.1.0:
1.2.0:
release_date: '2025-04-04'
changes:
release_summary: '| Release Date: 2023-11-28

| Community contribution Ansible Module systems_info to query registered systems in me.sap.com

| Community contribution Ansible Module license_keys to create systems and license keys on me.sap.com/licensekey
release_summary: Enhancements to Modules and introduction of new Ansible Role
minor_changes:
- sap_software_download - New Ansible Role with enhanced logic for downloading software using Ansible Module software_center_download (https://github.com/sap-linuxlab/community.sap_launchpad/pull/32)
- sap_software_download - Download stack XML option (https://github.com/sap-linuxlab/community.sap_launchpad/pull/35)
- software_center_download - Add option to search for latest packages (https://github.com/sap-linuxlab/community.sap_launchpad/pull/28)
- maintenance_planner modules - Add option to use Display ID instead of name (https://github.com/sap-linuxlab/community.sap_launchpad/pull/31)
- Collection Readme update and preparation for 1.2.0 release (https://github.com/sap-linuxlab/community.sap_launchpad/pull/34)
bugfixes:
- fix - cache gigya sdk build number (https://github.com/sap-linuxlab/community.sap_launchpad/pull/33)

1.1.1:
release_date: '2024-03-18'
changes:
release_summary: Various bug fixes
bugfixes:
- Append logic for Account Temporarily Locked Out
- Fix errors in the example file

'
1.1.0:
release_date: '2023-11-28'

1.0.1:
changes:
release_summary: '| Release Date: 2023-09-14
release_summary: Community contribution with new Ansible Modules systems_info and license_keys
minor_changes:
- Create/update systems and license keys (https://github.com/sap-linuxlab/community.sap_launchpad/pull/16)

| Fix for handling old password prompt

'
1.0.1:
release_date: '2023-09-14'
changes:
release_summary: Various bug fixes
bugfixes:
- Fix for handling old password prompt

1.0.0:
release_date: '2023-08-22'
changes:
release_summary: '| Release Date: 2023-08-22

| Initial Release on Galaxy

'
release_summary: Initial Release on Galaxy
fragments:
- v1.0.0_summary.yaml
release_date: '2023-08-22'
3 changes: 3 additions & 0 deletions docs/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
- **Sean Freeman** - Origin developer of Python API constructs, and project owner
- **SVA GmbH - System Vertrieb Alexander GmbH**
- **Rainer Leber** - User acceptance testing
- **SUSE**
- SUSE SAP Emerging Technology Solutions
- **Marcel Mamula** - Developer of Ansible Collection
Loading