sap.sap_operations.saplikey_get_info module – Get host hardware key information and other useful information 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_get_info.

New in sap.sap_operations 1.8.0-galaxy

Synopsis

  • Get host hardware key information and other useful information with saplikey program.

  • This module will execute command saplikey -get 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: Get sap hardware key for the host
  sap.sap_operations.saplikey_get_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

rc

integer

Return code of the saplikey program execution.

Returned: always

Sample: 0

saplikey_get_info

dictionary

The parsed output of the saplikey program execution.

Returned: success

hardware_key

string

The hardware key of the host.

Returned: success

Sample: "D1111111111"

installation_number

string

The installation number of the host.

Returned: success

Sample: "0"

release

string

The release of the host.

Returned: success

Sample: "749"

software_products

string

The software products of the host.

Returned: success

Sample: "NetWeaver_SYB"

system_id

string

The system ID of the host.

Returned: success

Sample: "AAA"

system_number

string

The system number of the host.

Returned: success

Sample: "0"

stderr

string

The standard error of the saplikey program execution.

Returned: always

Sample: ""

stdout

list / elements=string

The standard output of the saplikey program execution.

Returned: always

Sample: ["SAP License Key Administration  -  Copyright (C) 2003 - 2012 SAP AG", "{'System ID. . . .': 'AAA'}", "{'Hardware Key . .': 'D1111111111        (of this computer)'}", "{'Installation No.': 0}", "{'System No. . . .': 0}", "{'Release. . . . .': 749}", "{'Software products': 'NetWeaver_SYB'}"]

Authors

  • Kirill Satarin (@kksat)