sap.sap_operations.saplikey module – Manage sap license keys for SAP application instance with saplikey program.
Note
This module is part of the sap.sap_operations collection.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install sap.sap_operations
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: sap.sap_operations.saplikey
.
New in sap.sap_operations 1.8.0-galaxy
Synopsis
Either
filename
orlicense_content
should be provided. Filename is a path on the target host where license file is located.If
license_content
provided, it will be copied to temporary local file and then used for installation. File deleted afterwards.If state is
absent
,system
,hardware_key
andproduct
parameters are required.In order to use asterisk as a wildcard in
system
,hardware_key
andproduct
parameters, setallow_asterisk
to true. This is to prevent accidental deletion of licenses.Manage sap license keys for SAP application instance with saplikey program.
Uses saplikey program to get information about SAP license keys and manage them.
saplikey program is a part of SAP kernel
Requirements
The below requirements are needed on the host that executes this module.
saplikey program should be installed on the target host
Module should be executed on the host where SAP system is installed
Module should be executed with <sid>adm user
Module should be executed with interactive shell, for that additional parameters should be used: become: true become_user: <sid>adm become_flags: ‘-i’ Flag ‘-i’ is very important, module execution will fail without it. This is because saplikey program heavily relies on environment variables provided by SAP profile.
Parameters
Parameter |
Comments |
---|---|
Whether to allow the use of asterisks as wildcards in the system, hardware_key, and product parameters. This is to prevent accidental deletion of licenses. Choices:
|
|
Path to the license file to install or remove. |
|
The hardware key of the SAP system. |
|
The content of the license file to install or remove. This parameter is not logged. |
|
The product ID of the SAP system. |
|
Profile filename as mentioned in SAP documentation for saplikey program. Default: |
|
Whether the license should be present or absent. Choices:
|
|
The system ID of the SAP system. Or a wildcard asterisk |
Notes
Note
This module is experimental
Module interface (parameters, output) might change in future releases
Module interface (parameters, output) might change in future patches
Module might be removed in future releases
Module released only on Ansible galaxy and is not yet planned to be released on Ansible Automation Hub
See Also
See also
- SAP Note 181543 - License key for high availability environment
SAP Note 181543 - License key for high availability environment
- SAP Note 2755234 - Couldn’t load SAPSECULIB, first temporary license cannot be created by installer
SAP Note 2755234 - Couldn’t load SAPSECULIB, first temporary license cannot be created by installer
- sap.sap_operations.saplikey
Manage sap license keys for SAP application instance with saplikey program.
- sap.sap_operations.saplikey_show_info
Get information about SAP license keys with saplikey program.
- sap.sap_operations.saplikey_get_info
Get host hardware key information and other useful information with saplikey program.
- License Administration at Operating System Level with Program saplikey
License Administration at Operating System Level with Program saplikey
Examples
- name: Ensure license keys absent (with asterisks)
sap.sap_operations.saplikey:
state: absent
system: '*'
hardware_key: '*'
product: NetWeaver_SYB
allow_asterisk: true
become: true
become_user: <sid>adm
become_flags: '-i'
- name: Ensure license key present
sap.sap_operations.saplikey:
license_content: |
----- Begin SAP License -----
become: true
become_user: <sid>adm
become_flags: '-i'
- name: Ensure license key absent that does not exists
sap.sap_operations.saplikey:
state: absent
system: AAA
hardware_key: doesnotexists
product: doesnotexists
become: true
become_user: <sid>adm
become_flags: '-i'
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The list of installed license keys. Please pay attention that all dates are in format YYYYMMDD. Please pay attention that all numeric values are returned as strings. Returned: always Sample: |
|
Return code of the saplikey program execution. Returned: always Sample: |
|
The standard error of the saplikey program execution. Returned: always Sample: |
|
The standard output of the saplikey program execution. Returned: always Sample: |