community.general.sapcar_extract – Manages SAP SAPCAR archives

Note

This plugin is part of the community.general collection (version 3.6.0).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.sapcar_extract.

New in version 3.2.0: of community.general

Synopsis

  • Provides support for unpacking sar/car files with the SAPCAR binary from SAP and pulling information back into Ansible.

Parameters

Parameter Choices/Defaults Comments
binary_path
path
The path to the SAPCAR binary, for example, /home/dummy/sapcar or https://myserver/SAPCAR. If this parameter is not provided the module will look in PATH.
dest
path
The destination where SAPCAR extracts the SAR file. Missing folders will be created. If this parameter is not provided it will unpack in the same folder as the SAR file.
manifest
string
Default:
"SIGNATURE.SMF"
The name of the manifest.
path
path / required
The path to the SAR/CAR file.
remove
boolean
    Choices:
  • no ←
  • yes
If true the SAR/CAR file will be removed. This should be used with caution!
security_library
path
The path to the security library, for example, /usr/sap/hostctrl/exe/libsapcrytp.so, for signature operations.
signature
boolean
    Choices:
  • no ←
  • yes
If true the signature will be extracted.

Notes

Note

  • Always returns changed=true in check_mode.

Examples

- name: Extract SAR file
  community.general.sapcar_extract:
    path: "~/source/hana.sar"

- name: Extract SAR file with destination
  community.general.sapcar_extract:
    path: "~/source/hana.sar"
    dest: "~/test/"

- name: Extract SAR file with destination and download from webserver can be a fileshare as well
  community.general.sapcar_extract:
    path: "~/source/hana.sar"
    dest: "~/dest/"
    binary_path: "https://myserver/SAPCAR"

- name: Extract SAR file and delete SAR after extract
  community.general.sapcar_extract:
    path: "~/source/hana.sar"
    remove: true

- name: Extract SAR file with manifest
  community.general.sapcar_extract:
    path: "~/source/hana.sar"
    signature: true

- name: Extract SAR file with manifest and rename it
  community.general.sapcar_extract:
    path: "~/source/hana.sar"
    manifest: "MyNewSignature.SMF"
    signature: true

Authors

  • Rainer Leber (@RainerLeber)