community.sap_libs.sap_company 模块 – 此模块用于管理 SAP S4HANA 环境中的公司实体
注意
此模块是 community.sap_libs 集合 (版本 1.4.2) 的一部分。
如果您正在使用 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install community.sap_libs。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求。
要在剧本中使用它,请指定: community.sap_libs.sap_company。
community.sap_libs 1.0.0 中的新增功能
概要
- community.sap_libs.sap_user 模块依赖于 - pyrfcPython 库(版本 2.4.0 及更高版本)。根据您使用的发行版,您可能需要安装其他软件包才能使用这些库。
- 此模块将使用公司 BAPI - BAPI_COMPANY_CLONE和- BAPI_COMPANY_DELETE来管理公司实体。
要求
以下是执行此模块的主机所需的条件。
- pyrfc >= 2.4.0 
参数
| 参数 | 注释 | 
|---|---|
| 公司所在地的城市。 | |
| 要连接到的客户端编号。 必须用引号括住值以确保保留前导零。 默认值:  | |
| 公司 ID。 | |
| SAP 系统所需的密码。 | |
| SAP 系统所需的用户名。 | |
| 公司的国家代码。例如, | |
| 通用电子邮件地址。 | |
| SAP 系统所需的地址。可以是 FQDN 或 IP 地址。 | |
| 公司名称。 | |
| 附加公司名称。 | |
| 城市的邮政编码。 | |
| 决定对公司执行的操作。 选项 
 | |
| 公司所在地的街道。 | |
| 门牌号。 | |
| SAP 系统的系统编号。 必须用引号括住值以确保保留前导零。 默认值:  | |
| 时区。 | 
备注
注意
- 不支持 - check_mode。
示例
- name: Create SAP Company
  community.sap_libs.sap_company:
    conn_username: 'DDIC'
    conn_password: 'HECtna2021#'
    host: 100.0.201.20
    sysnr: '01'
    client: '000'
    state: present
    company_id: "Comp_ID"
    name: "Test_comp"
    name_2: "LTD"
    country: "DE"
    time_zone: "UTC"
    city: "City"
    post_code: "12345"
    street: "test_street"
    street_no: "1"
    e_mail: "[email protected]"
# pass in a message and have changed true
- name: Delete SAP Company
  community.sap_libs.sap_company:
    conn_username: 'DDIC'
    conn_password: 'HECtna2021#'
    host: 100.0.201.20
    sysnr: '01'
    client: '000'
    state: absent
    company_id: "Comp_ID"
    name: "Test_comp"
    name_2: "LTD"
    country: "DE"
    time_zone: "UTC"
    city: "City"
    post_code: "12345"
    street: "test_street"
    street_no: "1"
    e_mail: "[email protected]"
返回值
公共返回值已在 此处 记录,以下是此模块特有的字段
| 键 | 描述 | 
|---|---|
| 简短的执行描述。 返回值: 始终 示例:  | |
| 已执行任务的完整描述。如果可用。 返回值: 始终 示例:  | 
