sap.sap_operations.license_content filter – Get sap license attributes from sap license file

Note

This filter plugin 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.

To use it in a playbook, specify: sap.sap_operations.license_content.

New in sap.sap_operations 1.8.0-galaxy

Synopsis

  • Get sap license attributes from sap license file

  • This filter will parse sap license file and return dictionary with license attributes

  • If no line ‘—– Begin SAP License —–’ found, filter will return empty list

Keyword parameters

This describes keyword parameters of the filter. These are the values key1=value1, key2=value2 and so on in the following example: input | sap.sap_operations.license_content(key1=value1, key2=value2, ...)

Parameter

Comments

value

dictionary / required

Content of the sap license file

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

Examples

- name: Get sap license attributes from sap license file
  ansible.builtin.debug:
    msg: "{{ lookup('file', '/usr/sap/AAA/SYS/saplicense') | license_content }}"

Return Value

Key

Description

data

list / elements=dictionary

List of dictionaries with sap license attributes

Returned: Success

Sample: [{"begin_of_validity": "20200107", "end_of_validity": "99991231", "hardware_key": "D1111111111", "installation_number": "0000000000", "license_key": "MIIBOgYJ", "software_product": "NetWeaver_SYB", "software_product_limit": "2000000000", "system_id": "AAA", "system_number": "000000000000000000"}, {"begin_of_validity": "20200107", "end_of_validity": "20200408", "hardware_key": "D1111111111", "installation_number": "0000000000", "license_key": "MIIBOwY...", "software_product": "Maintenance_SYB", "software_product_limit": "2000000000", "system_id": "AAA", "system_number": "000000000000000000"}]

Authors

  • Kirill Satarin (@kksat)

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.