community.sap_libs.sapcar_extract 模块 – 管理 SAP SAPCAR 归档文件
注意
此模块是 community.sap_libs 集合(版本 1.4.2)的一部分。
如果您使用的是 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install community.sap_libs。
要在 playbook 中使用它,请指定:community.sap_libs.sapcar_extract。
community.sap_libs 1.0.0 中的新增功能
概要
- 提供使用来自 SAP 的 SAPCAR 二进制文件解压 - sar/- car文件并将信息拉回 Ansible 的支持。
参数
| 参数 | 注释 | 
|---|---|
| SAPCAR 二进制文件的路径,例如, | |
| SAPCAR 解压 SAR 文件的目标位置。将创建缺少的文件夹。如果未提供此参数,它将在 SAR 文件所在的同一文件夹中解压。 | |
| 清单的名称。 默认值:  | |
| SAR/CAR 文件的路径。 | |
| 如果  选择 
 | |
| 安全库的路径,例如, | |
| 如果  选择 
 | 
注释
注意
- 在 - check_mode中始终返回- changed=true。
示例
- name: Extract SAR file
  community.sap_libs.sapcar_extract:
    path: "~/source/hana.sar"
- name: Extract SAR file with destination
  community.sap_libs.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.sap_libs.sapcar_extract:
    path: "~/source/hana.sar"
    dest: "~/dest/"
    binary_path: "https://myserver/SAPCAR"
- name: Extract SAR file and delete SAR after extract
  community.sap_libs.sapcar_extract:
    path: "~/source/hana.sar"
    remove: true
- name: Extract SAR file with manifest
  community.sap_libs.sapcar_extract:
    path: "~/source/hana.sar"
    signature: true
- name: Extract SAR file with manifest and rename it
  community.sap_libs.sapcar_extract:
    path: "~/source/hana.sar"
    manifest: "MyNewSignature.SMF"
    signature: true
