sap.sap_operations.saplikey_show_info module – Get information about SAP license keys 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_show_info.

New in sap.sap_operations 1.8.0-galaxy

Synopsis

  • Get information about SAP license keys with saplikey program.

  • This module will execute command saplikey -show and parse its output.

  • 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

profile

path

Profile filename as mentioned in SAP documentation for saplikey program.

Default: "DEFAULT.PFL"

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.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: Show all sap license keys
  sap.sap_operations.saplikey_show_info:
  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

license_keys

list / elements=dictionary

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: success

Sample: [{"begin_of_validity": "20230111", "end_of_validity": "20240712", "hardware_key": "D1111111111", "installation_number": 0, "last_successful_check": "20231016", "software_product": "NetWeaver_SYB", "software_product_limit": "2000000000", "system_id": "AAA", "system_number": "000000000000000000", "type_of_license_key": "permanent", "validity": "valid"}, {"begin_of_validity": "20230111", "end_of_validity": "20240712", "hardware_key": "D1111111111", "installation_number": 0, "last_successful_check": "00000000", "software_product": "Maintenance_SYB", "software_product_limit": "2000000000", "system_id": "AAA", "system_number": "000000000000000000", "type_of_license_key": "permanent", "validity": "valid"}]

rc

integer

Return code of the saplikey program execution.

Returned: always

Sample: 0

stderr

string

The standard error of the saplikey program execution.

Returned: always

Sample: ""

stdout

string

The standard output of the saplikey program execution.

Returned: always

Sample: "SAP License Key Administration  -  Copyright (C) 2003 - 2012 SAP AG\n\nList of installed License Keys:\n==========================================\n\n1. License Key:\n------------------------------------------\nSystem                : AAA\nHardware Key          : D1111111111\nSoftware Product      : NetWeaver_SYB\nSoftware Product Limit: 2000000000\nType of License Key   : permanent\nInstallation Number   : 0000000000\nSystem Number         : 000000000000000000\nBegin of Validity     : 20230111\nEnd   of Validity     : 20240712\nLast successful check : 00000000\nValidity              : valid\n\n------------------------------------------\n1 license keys listed.\n"

Authors

  • Kirill Satarin (@kksat)