community.general.sapcar_extract (6.6.8) — module

Manages SAP SAPCAR archives

| "added in version" 3.2.0 of community.general"

Authors: Rainer Leber (@RainerLeber)

Install collection

Install with ansible-galaxy collection install community.general:==6.6.8


Add to requirements.yml

  collections:
    - name: community.general
      version: 6.6.8

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Extract SAR file
  community.general.sapcar_extract:
    path: "~/source/hana.sar"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Extract SAR file with destination
  community.general.sapcar_extract:
    path: "~/source/hana.sar"
    dest: "~/test/"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Extract SAR file and delete SAR after extract
  community.general.sapcar_extract:
    path: "~/source/hana.sar"
    remove: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Extract SAR file with manifest
  community.general.sapcar_extract:
    path: "~/source/hana.sar"
    signature: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Extract SAR file with manifest and rename it
  community.general.sapcar_extract:
    path: "~/source/hana.sar"
    manifest: "MyNewSignature.SMF"
    signature: true

Inputs

    
dest:
    description:
    - 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.
    type: path

path:
    description: The path to the SAR/CAR file.
    required: true
    type: path

remove:
    default: false
    description:
    - If C(true) the SAR/CAR file will be removed. B(This should be used with caution!)
    type: bool

manifest:
    default: SIGNATURE.SMF
    description:
    - The name of the manifest.
    type: str

signature:
    default: false
    description:
    - If C(true) the signature will be extracted.
    type: bool

binary_path:
    description:
    - The path to the SAPCAR binary, for example, C(/home/dummy/sapcar) or C(https://myserver/SAPCAR).
      If this parameter is not provided the module will look in C(PATH).
    type: path

security_library:
    description:
    - The path to the security library, for example, C(/usr/sap/hostctrl/exe/libsapcrytp.so),
      for signature operations.
    type: path